-2

I'm trying to connect to a UNIX server from a Windows server, through PSFTP. I am using this command in CMD: psftp.exe -i %userprofile%\.ssh\certificate.ppk username@unixserver

The problem is that server is refusing the private key I have stored in the Windows server. Is it possible to somehow install this private key in the UNIX server? I stored the same private key in my Unix home path (/home/user/.ssh/certificate.ssh) but the error is still there.

HBruijn
  • 77,029
  • 24
  • 135
  • 201

1 Answers1

1

You'll need to create a public key from this private key, using putty-keygen or something similar. Put the public key on the server into the home directory of the user you want to connect as and add key to the ~/.ssh/authorized_keys file.

Then change the permissions appropriately:

cd ~
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
HBruijn
  • 77,029
  • 24
  • 135
  • 201
Sirch
  • 5,785
  • 4
  • 20
  • 36
  • I uploaded the public key (certificate.pub) to `/home/user/` and added the key to authorized_keys, but the same error is showing: `Using username "slopez45". Server refused our key Using keyboard-interactive authentication. Password:`. I am still using the same PSFTP command, as if try to connect using the public key, another error shows. – salopez Mar 11 '15 at 17:15
  • Did you create a user slopez45 on the server? If thats the username, the public key written to will be `/home/salopez/.ssh/authorized_keys` troubleshooting psftp will be helped by using the `-v` flag. http://the.earth.li/~sgtatham/putty/0.52/htmldoc/Chapter6.html#6.1.3 – Sirch Mar 11 '15 at 18:40