Password needed for upload with scp

226 views
Skip to first unread message

Etienne Huens

unread,
Aug 12, 2022, 6:42:20 AM8/12/22
to iterm2-discuss
Hi,

When I drag-drop a file from Finder into iTerm2, I receive the message : "Authenticate username@remotehost Please enter the password for username@remotehost to begin secure copy". If I enter manually my remote server's password, the copy is done.

However, my public key is put on the remote server. If I run the bash command "scp localfile username@remotehost:destinationfile", my public key is used and I don't need to enter any password.

Here is my config :
Iterm2 : 3.4.15
Local : MacOS 12.5
Remote Server : Ubuntu 22.04 LTS, Shell Integration is installed.

Have you got any idea to use drag-drop without password ?

Thank you in advance,
Regards,

Etienne.

George Nachman

unread,
Aug 12, 2022, 7:03:02 PM8/12/22
to iterm2-...@googlegroups.com
iTerm2 may be falling to parse your ~/.ssh/config the same way that OpenSSH does. What does the entry in that config file look like for this host?

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/27cc1278-6168-4b58-b0f2-a3f532c1b072n%40googlegroups.com.

Etienne Huens

unread,
Aug 16, 2022, 6:45:23 AM8/16/22
to iterm2-discuss
Thank you George for suggesting that I look at the SSH server configuration. While the drag-drop, I looked at the SSH logs on the server and saw the following error message:

Aug 16 12:30:15 zlop sshd[3359]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

I added the following directive to /etc/sshd_config :

PubkeyAcceptedKeyTypes=+ssh-rsa

Now the problem is solved. I think it's an SSH problem because the error message appeared recently on several forums with a new version of SSH. For information, this problem was not present with Ubuntu 20.04 LTS, but it is present in 22.04. LTS.

Regards,

Etienne.

George Nachman

unread,
Aug 17, 2022, 5:45:00 PM8/17/22
to iterm2-...@googlegroups.com
This probably comes down to a difference in defaults between libssh2 and openssh. I’m glad you were able to get it working.

Reply all
Reply to author
Forward
0 new messages