02-05-2021



You need your SSH public key and you will need your ssh private key. Openvpn vs tunnelblick. Keys can be generated with ssh-keygen. The private key must be kept on Server 1 and the public key must be stored on Server 2. This is completly described in the manpage of openssh, so I will quote a lot of it. You should read the section 'Authentication'. Ssh-agent is a program that can hold a user's private key, so that the private key passphrase only needs to be supplied once. A connection to the agent can also be forwarded when logging into a server, allowing SSH commands on the server to use the agent running on the user's desktop. One is called a private key and the other is called a public key. Basically a user creates these keys in pairs (with public and private key counterpart.) The basic idea is Things encrypted using the SSH Public key can only be decrypted using ssh private key. Some important things to note about ssh key.

For a concise summary, skip to the end!

Recently, I was given access to a server which requires key authentication using a PuTTY key (with the extension .ppk).

So I tried the usual:

You need your SSH public key and you will need your ssh private key. Keys can be generated with ssh-keygen. The private key must be kept on Server 1 and the public key must be stored on Server 2. This is completly described in the manpage of openssh, so I will quote a lot of it. You should read the section 'Authentication'.

But it asked me for a passphrase, which I never set:

After some digging around, it turns out PuTTY uses a different key format than the de facto standard - OpenSSH.

Because of this, ssh didn't recognise the key format and assumed it was encrytped by a passphrase.

Private

So there are two ways you can use the PuTTY key to login to the server and/or transfer files:

  • Convert the PuTTY private key (.ppk) to a PEM-formatted file (the 'normal' private key format used by OpenSSH) and ssh/sftp in the usual way; or
  • Use a PuTTY SSH client to login and pscp to transfer files
Key

Ssh Command Private Key

Converting the .ppk to PEM

This is probably the most convenient way as you only have to run one command and everything would be like it was before:

Now you can run the command again as before, but this time you should be granted access automatically.

Bluestacks n beta download for mac. The same is true for sftp:

Use a PuTTY SSH client to login and pscp to transfer files

Login using PuTTY SSH Client

First, download the PuTTY SSH Client. If you're using a Linux distribution, check the package repositories as well (PuTTY is such an old ancient program you practically don't need to ensure it's up-to-date)

Open up the client and under Session, input your host's name or IP address. If you're server's default SSH port has been changed, input the port number too.

Next, go to SSH > Auth and browse for your private key.

After that, click 'Open'.

It will prompt you for the username, enter it

and if your credentials are correct, be given access to the server.

How To Ssh Using Private Key

Transferring Files using pscp

Transferring files the pscp command is similar to using the sftp command:

The -r flag tells pscp to transfer all the files recursively inside the directory, sftp forces pscp to use the the SFTP protocol (instead of SCP) and the -i flag allows you to specify the key to use.

Read about the Difference between the SCP and SFTP Protocols on SuperUser.

For a full list of options, run pscp -h

Summary

To login using a .ppk key, you can:

  • Convert it to a PEM-formatted OpenSSH key and use ssh normally:

  • Download and use the PuTTY client

Ssh Using Private Key Asking For Password

Ssh

To transfer files using a .ppk key, you can:

Ssh Using Private Key In Putty

  • Convert it to a PEM-formatted OpenSSH key and use ssh normally:

  • Use pscp