Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. SSH to the remote machine: 

    Code Block
    ssh <username>@<remotemachine>


  2. Then confirm the remote machine has a ".ssh" folder in your account's home directory: 

    Code Block
    ls -la ~


  3. If it does not, create the .ssh folder: 

    Code Block
    mkdir ~/.ssh


  4. Now copy your local public key to the remote machinehome directory of the remote server.  Repeat for each account

    Code Block
    scp ~/.ssh/id_rsa.pub <username>@<remotemachine>:~/.ssh/<localmachinename>.pub

    where <hostmachinename> <localmachinename> will help identify the source of the public key. 

  5. Now SSH into the remote machine you have copied the file to, and cd to the .ssh directory in your home directory: 

    Code Block
    cd ~/.ssh


  6. You'll see the <hostmachinename><localmachinename>.pub file you just copied over. Add its contents to a file named "authorized_keys": 

    Code Block
    cat ~/.ssh/<hostmachinename><localmachinename>.pub >> ~/.ssh/authorized_keys


  7. Make sure that directory and it's files are only accessible by your account: 

    Code Block
    chmod 700 ~/.ssh
    chmod go-rwx ~/.ssh/*


  8. Back on the local machine, test SSH:

    Code Block
    ssh <username>@<remotemachine>

    which should result in a login without a password. 

  9. Repeat for every remote machine that does not have a centralized network home directory.