Topic "Server refused our key"

Author Message
wtlinnertz

Guest


I am using WinSCP 4.2.7 on WindowsXP SP3 and am having trouble using a private key when transferring files using SFTP.

When using WinSCP.exe and I set the path to my private key file I am able to authenticate to the remote site. However when I use WinSCP.com and pass the same key file path by using the -privatekey switch of the open script command I get the error "Server refused our key." I need to get the WinSCP.com to behave like WinSCP.exe.

The path I am testing with is c:\key.ppk.

Here is the script:
Code:
WinScp script
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
#
#Dynamic code is added below
#
open -passive -timeout=6 SFTP://userid@st.concursolutions.com -privatekey=c:\key.ppk -hostkey="ssh-rsa 2048 4f:cd:a3:33:4b:63:38:48:7a:c4:4e:25:28:3d:a2:f3"
PUT -resume c:\test.asc test.asc
close
exit


Here is the output:
Code:
c:\winscp.com /script=st.concursolutions.com.17294.txt
batch           abort
confirm         off
Searching for host...
Connecting to host...
Authenticating...
Using username "userid".
Server refused our key.
Using keyboard-interactive authentication.
Password:
Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication log (see session log for details):
Using username "userid".
Server refused our key.

Authentication failed.


Thanks,
Todd
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Can you post a full log file for both cases?
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License