Topic "Preparation Required for an SFTP Script"

Author Message
achyau
[View user's profile]

Joined: 2012-09-19
Posts: 1
Location: Hong Kong
Dear,

My vendor has created an account for me to access their SFTP server. I had created an script but could not pass the password authentication.

Below are the information provided by the vendor:

1. account name
2. SFTP server IP address and port number
3. private key(ppk)(no Encryption)

What I have done were:
1. Use PuTTY Key Generator to generate the Key Fingerprint:
- open PuTTY Key Generator
- Load the private key file
- select key type = SSH-2 RSA (1024 bits)
- NOTE: I have not enter a Key passphrase
- Generate
- copy the generated Key fingerprint and copy as -hostkey as shown
below
2. Create a script to connect to the SFTP server:
- open sftp://myaccount@10.6.109.135:22 -hostkey="ssh-rsa 1024
3d:5c:c8:dd:78:76:77:8b:66:64:61:71:6c:ec:67:05"
3. Received an authentication error as shown in the log file attached.

My questions are:
a. do I need the vendor to create the account password and embed it
in the open statement?
b. if not, how can I resolve the authentication problem.

Thanks in advance.

Alex Yau
winscp_out.log (3.18 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
1) You need to use -privatekey to specify a path to your private key.
2) In -hostkey you specify fingerprint of server's public key, not your private key.

No need to your step 1.
_________________
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