Error with script

Advertisement

bajuli
Joined:
Posts:
1

Error with script

Hello,

I have an issue with a script, which I created with a manual of WinSCP (https://winscp.net/eng/docs/script_upload_single_file).

open sftp://user:password@servername/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

I used user, password, server and ssh key as described, but I receive an authentication error.

"Access denied. Connection has been unexpectectedly closed. Server sent command exit status 0. Authentication failed."

When I use the script without password and enter it manually in the command line, everything works fine and I don't get an authentication error. Can anyone help? Is this a problem of the script or with my FTP server? I use a Synology NAS Storage as FTP server.

Thank you for your help.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Error with script

Please attach a full session log file for both scenarios.

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Makc666
Joined:
Posts:
50
Location:
MSK-RU

Try to change you password to simple one with out extra characters like $#&%^%@#$&*@^%#()

Or try to use:
open "sftp://user:password@servername/" -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

Reply with quote

Advertisement

You can post new topics in this forum