Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Ssh keys

32 bytes removed, 13:04, 24 January 2008
m
correct display title, use interwiki for wikipedia link
{{wrongtitle|DISPLAYTITLE:ssh keys}} OpenSSH has several authentication mechanismmechanisms. The most known one is then you type in the password, which is then checked against the password at the remote system. While this is straightforward and does not usually require any additional setup, it is not convenient to enter the password each time.
This article describes how to set up a passwordless ssh login, using ssh key pairs. This can be convenient e. g. in cases when you use [[Checkpointing and live migration|live migration]].
== Theory ==
OpenSSH uses several assymmetric cryptography algorithms, where a pair of keys are generated. Those keys are known as ''public key'' and ''private key''. Public keys can then be uploaded to a remote system which you want a passwordless access to. ''See more at [http://en.wikipedia.org/wiki/Public-key_cryptography [wikipedia: Public-key cryptography]].''
''Your'' OpenSSH public keys are usually stored in <code>~/.ssh/id*.pub</code> files, and your private keys are stored in the <code>~/.ssh/id*</code> files (the ones without <code>.pub</code> suffix).
The following script can be used to automate a process of generating ssh key pairs and putting the public keys to an account on a remote host. Place the script to <code>/usr/local/bin</code> or your <code>~/bin</code> and enable its execution (i.&nbsp;e. do <code>chmod a+x ssh-keyput</code>).
<presource lang="bash">
#!/bin/bash
#
done
done
</presource
[[Category: HOWTO]]