Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: WinSCP authentication with ssh

martin wrote:

If you want to login with a private key, you have to specify it (as you do in the GUI). Use -privatekey switch:

Thank you, your solution is correct, but I figured out the same thing couple of hours ago after wasting like 6h :D

I know that connection is closed because password authentication is disabled, but why it's not using SSH.
Port is open and I can login wit WinSCP GUI using the private.ppk file.

This is what CMD looks like.

WinSCP authentication with ssh


I want to use a WinSCP script to get files from Linux server with Windows Command Prompt.

I use a script for that

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to SFTP server using a password
open sftp://user@ip:port/ -hostkey="ssh-rsa 2048 fingerprint"
# Upload file
get out/* C:\Users\Timo\Documents\Olerex\in\
# Disconnect

When I run it in Command Prompt it tries to authenticate with password , that is not allowed.