WINSCP SFTP authentification in script fails

Advertisement

Patchi
Guest

WINSCP SFTP authentification in script fails

Did anyone encounter issues with authentification in script ?

I have a couple of scripts that are OK, using a full commande line (protocol, user, password, host, port, hostkey).

But this one fails whereas typing each parameters at the commande line is OK.
I read the FAQ, documentations, doublechecked the parameters are correct

Is there a mean to pass arguments (user, password especially) one by one, on seperate lines in a script ?


Script
open sftp://lar_user_test:***@83.206.193.82 -hostkey="ssh-rsa 2048 ....4="
Searching for host...
Connecting to host...
Authenticating...
Using username "lar_user_test".
Authenticating with pre-entered password.
Access denied.
Access denied.
Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication log (see session log for details):
Using username "lar_user_test".
Access denied.
Access denied.

Command line
winscp> open
Host: 83.206.193.82
Searching for host...
Connecting to host...
Authenticating...
Username: lar_user_test
Password:
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [2] 83.206.193.82
winscp> bye
..

Reply with quote

Advertisement

Patchi
Guest

WINSCP SFTP authentification in script fails

Finally,

I used the windows interface and exported (Generate Session URL Code) the sesssion, that created a commande line that is OK.
It is strange to see that the ssh key was chrunked and the password contains "%".

But it works !!

open sftp://lar_user_test:%2xx%xx%2xx@83.206.193.82/ -hostkey=""ssh-rsa 2048 XbaOy07AZUIIkurQCDFH9oAYPp2g0NsmjQ9aSNq+5q4="""

Reply with quote

ovakho
Joined:
Posts:
4
Location:
CLC

Host key does not match configured key fingerprint

All attempts to connect to the vendor’s server failed with the same message:

open sftp://<username>@<domain>.com -hostkey="key fingerprint from Private key"
Searching for host...
Connecting to host...
Authenticating...
Host key does not match configured key fingerprint "ssh-rsa 2048 key fingerprint from Private key "!
Host key fingerprint is ssh-rsa 2048 N+G9MpbdPHnqznk7xw/LtdK4NJZTzhv8MlZDS0bt8UQ=.
Authentication failed.

The server's ssh-ed25519 key fingerprint is:
ssh-ed25519 255 <fingerprint >

How is it possible that it shows the key type of ssh-ed25519, while the generated key-pair is ssh-rsa 2048?
What am I missing?

Reply with quote

Advertisement

You can post new topics in this forum