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

[BUG] - Can't handle missing IdentityFile in ssh config #218

Closed aedm closed 7 months ago

aedm commented 9 months ago

Description

The ssh command automatically tries to use ~/.ssh/id_rsa as a private ssh key, while termscp doesn't. Termscp needs IdentityFile ~/.ssh/id_rsa to be explicitly specified in the config file.

Steps to reproduce

Given the following entry in ~/.ssh/config:

Host myserver
    Hostname 1.2.3.4
    User ubuntu
    IdentityFile ~/.ssh/id_rsa

both ssh myserver and termscp myserver work as expected.

But if I remove IdentityFile from ~/.ssh/config:

Host myserver
    Hostname 1.2.3.4
    User ubuntu

then ssh myserver still works. But termscp myserver asks for a password. When I press enter, it fails to log in with the following message: authentication failed ([Session(-18)] Authentication failed (username/password))

Expected behaviour

If ssh myserver works in the absence of IdentityFile, then termscp myserver works, too.

Environment

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.