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.49k stars 45 forks source link

[Feature Request] - Document which ~/.ssh/config features you support #177

Closed markstos closed 1 year ago

markstos commented 1 year ago

Description

It would be helpful if the supported ~/.ssh/.config features were documented, even if it's just a mention that you support all the features that some other library supports.

For example, Today I I tried a syntax like:

termscp server

The equivalent syntax of ssh server works, but termscp fails, and it's not clear why.

First termscp prompted for a password, which the server doesn't require. From a related comment (https://github.com/veeso/termscp/issues/149#issuecomment-1454336706 ), it appears I can just press enter there, so I did.

The error I get is "bad address syntax: (Failed to lookup address information: Name or service not known). "

I tried getting debug logs, and got this:

2023-05-01T13:14:05.377249785Z [INFO] Client is not connected to remote; connecting to sites:22
2023-05-01T13:14:05.377748894Z [DEBUG] (1) remotefs_ssh::ssh::sftp: Initializing SFTP connection...
2023-05-01T13:14:05.37777977Z [TRACE] (1) remotefs_ssh::ssh::config: [/root/.cargo/registry/src/github.com-1ecc6299db9ec823/remotefs-ssh-0.1.6/src/ssh/config.rs:68] Parsing configuration at /home/user/.ssh/config
2023-05-01T13:14:05.377823453Z [DEBUG] (1) remotefs_ssh::ssh::commons: Connecting to 'server:22'
2023-05-01T13:14:10.204896173Z [INFO] FileTransferActivity terminated due to 'Authentication'
2023-05-01T13:14:10.21856889Z [INFO] Starting AuthActivity...

Maybe the issue is that this server uses a bastion host with ProxyCommand, but without knowing which ~/.ssh/config features are supposed to work, I can't check for myself.

markstos commented 1 year ago

I tried a simpler connection to just connect directly to the bastion host by the IP address:

termscp scp://user@1.2.3.4/

But that also failed with an authentication error, also SSH'ing to the server with key authentication doesn't prompt for a password. The debug logs say:

" couldn't find any ssh key associated to user at 1.2.3.4. Trying with ssh2 config."

But ssh user@1.2.3.4 works. The logs show it has parsed my SSH config file, so clearly there's some feature that's not supported.

My config file also uses the include directive. I thought maybe that was it.

Anyway, if the feature was published, I could compare.

veeso commented 1 year ago

" couldn't find any ssh key associated to user at 1.2.3.4. Trying with ssh2 config." But ssh user@1.2.3.4 works. The logs show it has parsed my SSH config file, so clearly there's some feature that's not supported.

Fixed in 0.12

Also, I've added the parameters in the user manual for 0.12