Connect with SSH and public key

Locked
donj91711
Posts: 34
Joined: Fri Jul 30, 2010 7:01 pm

Connect with SSH and public key

Post by donj91711 » Fri Jul 22, 2011 7:33 pm

I am trying to connect to a client using SSH
They gave me an ID, but no password. Everything I will be ftp'ing to them will be encrypted with pgp, so they gave me a public key to use.
When I try to connect I get:

[20110722 18:35:57] SmartFTP FTP Library 2.0.86.0
[20110722 18:35:59] Resolving host name "<client host>"
[20110722 18:35:59] Connecting to <client ftp ip address> Port: 22
[20110722 18:35:59] SSH-2.0-XFB.Gateway Unix
[20110722 18:35:59] Starting SSH session. Remote Id: "SSH-2.0-XFB.Gateway Unix"
[20110722 18:35:59] SSH protocol version reply. Client Id: "SSH-2.0-SmartFTP"
[20110722 18:36:00] Key Exchange Algorithm: diffie-hellman-group-exchange-sha1
[20110722 18:36:00] Key exchange completed.
[20110722 18:36:00] Host Key Algorithm: ssh-rsa
[20110722 18:36:00] Client to Server Encryption: aes128-cbc
[20110722 18:36:00] Server to Client Encryption: aes128-cbc
[20110722 18:36:00] Session MAC: hmac-sha1
[20110722 18:36:00] Client to Server Compression: none
[20110722 18:36:00] Server to Client Compression: none
[20110722 18:36:00] Requesting service "ssh-userauth".
[20110722 18:36:00] RTT: 199.428 ms
[20110722 18:36:00] Authentication request. Method: "none"
[20110722 18:36:00] Server supported authentications: publickey
[20110722 18:36:00] User authentication failed.
[20110722 18:36:00] Client closed the connection.
[20110722 18:36:00] 2

The code I am using is:
Public objSSH As sfFTPLib.SSHConnection
Set objSSH = CreateObject("sfFTPLib.SSHConnection")
objSSH.Host = "<ftp site>"
objSSH.Username = "<user id>"
objSSH.Password = ""
objSSH.Port = 22
ret = objSSH.Connect

I get ret code 25

I'm sure I'm missing something here. Am I supposed to refer to their public key somewhere before I try to connect?

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connect with SSH and public key

Post by mb » Fri Jul 22, 2011 7:33 pm

Try it with the SmartFTP client first.

Locked