veeso / termscp

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.61k stars 46 forks source link

Parsing SSH config + identity files #87

Closed mausch closed 2 years ago

mausch commented 2 years ago

Hi, I noticed that https://github.com/veeso/termscp/issues/77 / https://github.com/veeso/termscp/pull/84 implemented parsing a SSH config.

I built master and then I added the following to my termscp config but nothing seems to happen?

[remote]
ssh_config = "/etc/ssh/ssh_config"

That file has a Host section so I was expecting to see that host as a bookmark in termscp, maybe I'm misunderstanding what was implemented?

Also my ssh_config has a IdentityFile directive for the Host section so I was hoping to use this to avoid having to "import" the SSH key into termscp manually, but it seems https://github.com/veeso/ssh2-config doesn't support IdentityFile? It seems to support pretty much everything else so maybe there's a reason for this?

In the end I'd love it if I could just run termscp my_host and have termscp read all config from my ssh config file.

veeso commented 2 years ago

Hi,

the PR has been merged but hasn't been released yet. It has been merged into the 0.8.0 branch. The 0.8.0 version will be released in a few weeks I hope.

Also my ssh_config has a IdentityFile directive for the Host section so I was hoping to use this to avoid having to "import" the SSH key into termscp manually, but it seems https://github.com/veeso/ssh2-config doesn't support IdentityFile? It seems to support pretty much everything else so maybe there's a reason for this?

I'll add the identity file parameter to ssh-config, actually, I forgot about it. Thanks for reporting it!

In the end I'd love it if I could just run termscp my_host and have termscp read all config from my ssh config file.

For the last point, that's exactly how it'll work.

shellwhale commented 1 month ago

Hi, how can I specify which configured host (saved in the config file) I can connect to ?

Because termscp myhost1 still asks for a password and does not use my SSH key.

veeso commented 1 month ago

@shellwhale you have to specify the -b option which considers the argument as a bookmark