I don't have the ssh-copy-id command (windows client)

29,157

With putty, you can upload public key manually, assuming you now can access the server with username and password:

  1. Generate the key file, with the guide you followed it will be .pub file, the content of the file should shart with "ssh-rsa AAAA ...."
  2. Login to the server machine
  3. Copy the content of the .pub file into the ~/.ssh/authorized_keys file (for this use vim, nano or your favourite text editor)

If your SSH directory does not exist, create it and then copy the pub file into the ~/.ssh/authorized_keys:

mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0644 ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys
...

Now you should be able to login with your private key file.

Share:
29,157

Related videos on Youtube

Gyt Dau
Author by

Gyt Dau

Updated on September 18, 2022

Comments

  • Gyt Dau
    Gyt Dau over 1 year

    I'm following this guide to set up an RSA key pair with my VPS.

    I'm using my Windows PC to follow through with the first part of the guide, and ssh-copy-id does not exist in the command prompt (neither does cat) - meaning I can't send the public key to the server.

    Am I doing it wrong? Is it because I'm using Windows?

    • Gyt Dau
      Gyt Dau almost 9 years
      Oh, okay, I thought that it was relevant because the VPS is running Ubuntu. Thank you.
  • Panther
    Panther almost 9 years
    to copy the file, I suggest ou use winscp ;)