Network Automation Software
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: sftp with public key
Topic Summary: sftp fails to connect with "Private key is invalid"
Created On: 01/11/2012 12:40 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/11/2012 12:40 PM
User is offline View Users Profile Print this message

Author Icon
HollyBeck
n00b (>6 posts)

Posts: 4
Joined: 10/24/2011

I was given a public key as a .pub file and a username.

The public key is in ssh-rsa.

We also tried DES encryption -- that resulted in "Passphrase is wrong" 

Does the public key need to be in a particular format?

Thanks,

Holly

 



 Category Survey
 01/11/2012 04:31 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Holly,

Does your passphrase contain any %? If so you will need to double them up. for example if you passphrase is a%bc your passphrase will need to be a%%bc

Let us know if that works for you.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 01/11/2012 04:58 PM
User is offline View Users Profile Print this message

Author Icon
HollyBeck
n00b (>6 posts)

Posts: 4
Joined: 10/24/2011

I did not get a passphrase with the public key.

Holly



 Category Survey
 01/12/2012 03:36 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Holly,

Can you please confirm that public key does not require a password? A password maybe required to connect to your sftp server.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 01/19/2012 10:00 AM
User is offline View Users Profile Print this message

Author Icon
HollyBeck
n00b (>6 posts)

Posts: 4
Joined: 10/24/2011

I've gotten a little bit farther.

I generated my own public key and sent that to the server admin. They had to modify some firewall settings.

Now, I get Connection lost  (error code 10058) when I try to login. The error implies that the client has closed the session. We're still investigating connectivity issues on both ends of the connection.



 Category Survey
 01/19/2012 02:54 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Holly,

Does the Key have a password set to it?

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 01/23/2012 11:03 AM
User is offline View Users Profile Print this message

Author Icon
HollyBeck
n00b (>6 posts)

Posts: 4
Joined: 10/24/2011

I've tried keys with and without a passphrase.

I've tried both the Ignore and Validate options for the SFTP Server Host's key.

I have confirmation from the server folks that the request is getting through the firewall.

The output window shows:

[Main](Step 10) Logging on to ftp server "Host". Session "FTPSession" started.
[Main](Step 10) FTP Error : Connection lost (error code is 10058)

This is my task (with disabled steps removed and names changed to protect the innocent):

<AMVARIABLE NAME="WorkFlowStep"></AMVARIABLE>
<AMVARIABLE NAME="FTPDir">Folder</AMVARIABLE>
<AMVARIABLE NAME="FTPHost">Host</AMVARIABLE>
<AMSET VARIABLENAME="WorkFlowStep">transmitting data via SFTP to %FTPHost%/%FTPDir%.</AMSET>
<AMFTP ACTIVITY="logon" SERVER="%FTPHost%" USERNAME="userid" TYPE="sftp_public_key" PORT="22" LOGFILE="W:\AutomateBPA\SFTP.log" PRIVATEKEYFILE="W:\AutomateBPA\privatekey.ppk" />
<AMFTP ACTIVITY="logoff" AM_ONERROR="CONTINUE" />

 It's failing on the logon step.

Incidentally, my SFTP.log file is empty -- does that indicate something is not setup correctly?

Thanks,

Holly



 Category Survey
 01/23/2012 02:28 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Holly,

Would it be possible to setup a GoToAssist session so that we can take a closer look at this issue? If so please send an email to support@networkautomation.com with your availability.

Note: Please reference this forum thread in your email.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
Statistics
18257 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 334 guests browsing this forum, which makes a total of 334 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog