Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with SFTP URIs and grouped hosts #13

Open
lanceschi opened this issue Dec 1, 2021 · 5 comments
Open

Issue with SFTP URIs and grouped hosts #13

lanceschi opened this issue Dec 1, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@lanceschi
Copy link

Hello @Julien-R44,

and thanks for the beautiful fast-ssh TUI app!

I'd like especially the possibility to group the various hosts just prefixing them with a word/string and a slash:

Host Development/alpha
    Hostname 1.2.3.4
    User superman
    IdentityFile /keys/personal.pem
    ServerAliveInterval 60

The only issue I'm facing is with nautilus SFTP URI bookmarks. For example the above host would translate into an invalid:

sftp://Development/alpha/home/superman

The ugly workaround I found this far is to add a second Host reference to the first one in the ~/.ssh/config:

Host Development/alpha
Host alpha
    Hostname 1.2.3.4
    User superman
    IdentityFile /keys/personal.pem
    ServerAliveInterval 60

In order to let me correctly reference the host in SFTP URIs:

sftp://alpha/home/superman

Do you know by any chance how to escape Development/alpha?

Thanks in advance

@Julien-R44
Copy link
Owner

Julien-R44 commented Dec 1, 2021

Hello, thank you very much!
I don't have a Linux computer at hand so I can't answer you right now. It doesn't seem to me that there is a way to escape anything in an SSH config file, but I will check that.
What I can tell you is that I plan to add another way to make groups for fast-ssh via comments, like this:

# FastSSH
#   Group Development
#   AnotherMetaDataKey Foo
Host alpha
    Hostname 1.2.3.4
    User superman
    IdentityFile /keys/personal.pem
    ServerAliveInterval 60

This should solve your problem. I hope to implement this in the next few weeks !

@Julien-R44 Julien-R44 added the enhancement New feature or request label Dec 1, 2021
@lanceschi
Copy link
Author

lanceschi commented Dec 1, 2021

That new implementation for groups would be great!

@lanceschi
Copy link
Author

Please consider also an inline solution:

Host alpha
    # FastSSHGroup Development
    Hostname 1.2.3.4
    User superman
    IdentityFile /keys/personal.pem
    ServerAliveInterval 60

It would be more compact and convenient for ~/.ssh/config with a lot of entries.

@lanceschi lanceschi reopened this Dec 2, 2021
@r3h0
Copy link

r3h0 commented Apr 26, 2022

A similar issue comes up with scp. When I type scp group/host1:/ and hit TAB, the auto-complete fails to understand the path. With names like scp group-host1:/ it successfully completes the possible options. This ended up being a deal breaker for me (for now anyway) since it's easier to remember my SSH hosts than to remember the exact paths on each one.

@r3h0
Copy link

r3h0 commented Apr 26, 2022

@Julien-R44, I love the idea of configuring FastSSH through comments in my SSH config file. Would I be able to configure the colors that way also? I default to light mode (sad, I know) and the foreground text being white is a problem for me. Let me know if you want a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants