Stylesheet style.css not found, please contact the developer of "arctic" template.

SSH - Remote Logon with Public Key

There a two different methods in order to configure a passwordless SSH logon on a remote HOME:

Passwordless SSH key

  1. Create ssh key pair (private and public key) without password: e.g. ssh-keygen -b 4096 -t rsa -f [keyfile_name], type ENTER (empty passphrase)
  2. Configure logon to your remote HOME: Login to remote account and add content of [public_keyfile].pub (be careful to choose the file ending in .pub and not the private keyfile!!!) to the content of ~/.ssh/authorized_keys
  3. Please ensure that the folder ~./ssh and the file ~/.ssh/authorized_keys only have access rights for the owner (group and others should have no rwx)
  4. Then you are ready to do remote ssh logon without password :-)


Using the SSH agent

  1. Test if environment variables SSH_AGENT and SSH_AUTH_SOCK are defined; if not invoke a new ssh agent via eval $(ssh-agent)
  2. Create ssh key pair (private and public key) with password: e.g. ssh-keygen -b 4096 -t rsa -f [private_keyfile], type a passphrase and hit ENTER
  3. Add you private key to the ssh-agent: ssh-add [private_keyfile]
  4. Configure logon to your remote HOME: Login to remote account and add content of [public_keyfile].pub (be careful to choose the file ending in .pub and not the private keyfile!!!) to the content of ~/.ssh/authorized_keys
  5. Please ensure that the folder ~./ssh and the file ~/.ssh/authorized_keys only have access rights for the owner (group and others should have no rwx)
  6. Then you are ready to do remote ssh logon without password :-)
  7. BTW: The ssh-agent can be locked by password (ssh-agent -x; then type your password) and unlocked (ssh-agent -X; then type your password)
  8. Attention: The ssh-agent is not a permanent keystore! You have to add the private key manually for every new user session to the agent (e.g. on behalf of a script).


date of revision: 03-07-2019 © kraus

hpc/numericserveruser/logon/ssh.txt · Zuletzt geändert: 2019/06/17 16:09 von kraus
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0