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.55k stars 46 forks source link

[New Feature] - termscp doesn't use id_rsa default SSH private key to authenticate to SFTP / SCP endpoint #126

Closed pcgeek86 closed 1 year ago

pcgeek86 commented 1 year ago

Description

I would like termscp to use the id_rsa default SSH private key on my local filesystem.

Steps to reproduce

Try to connect to SFTP or SCP endpoint without using a password. Authentication fails.

Expected behaviour

By default, termscp should use $HOME/.ssh/id_rsa to authenticate as <username> at <hostname>.

Environment

Log

Report the snippet of the log file containing the unexpected behaviour. If there is any information you consider to be confidential, shadow it.

Additional information

Add any other context about the problem here.

veeso commented 1 year ago

It should have already been fixed in 0.10. Duplicated of #123

pcgeek86 commented 1 year ago

Sorry I missed that one.

Ragarnoy commented 1 year ago

@veeso it somehow isn´t fixed for me even though i'm on the latest version, it keeps on asking me my password

 2022-11-04T14:43:53.400022129Z [INFO] Client is not connected to remote; connecting to something.something.something.fr:4222
 2022-11-04T14:43:53.473244033Z [ERROR] Authentication failed: [Session(-18)] Authentication failed (username/password)
 2022-11-04T14:43:54.433694461Z [INFO] FileTransferActivity terminated due to 'Authentication'
namespaceYcZ commented 1 year ago

It should have already been fixed in 0.10. Duplicated of #123

I don't understand...... I can ssh to an host using my default id_rsa key like this: image But, it failed on termscp, it said "bad address syntax": image (termscp sftp://test-ubuntu failed too) image However, I did set the ssh config path: image

By the way, may I request a new feature, like key remapping? I prefer vim-like keymap.

scottbilas commented 1 year ago

I have the same issue, same repro, though a different error message.

My ssh config has more than host info in it - for example Protocol 2 at the top. This gives an error IO error (Could not parse configuration file: unknown field: Protocol).

Then, if I comment out everything in my config except the Host blocks and retry an scp connection with no user/pass, I get a different error: authentication failed (could not find any suitable RSA key to authenticate with).

(My ssh host does not permit key/pass entry, only ssh, so I'm unable to use termscp to connect because of this problem.)

veeso commented 1 year ago

definitely fixed in 0.11

namespaceYcZ commented 1 year ago

Did v0.11.0 solve your problem? It does not work for me.

veeso commented 1 year ago

Yes, 0.11.0 fixed this. At this point if it still doesn't work for you, please open another issue reporting your ssh configuration and the host parameters.