6,535
edits
Changes
m
If you intend to accomplish [[VE]]s [[Checkpointing and live migration|migration]] between nodes you have to generate {{DISPLAYTITLE:ssh keys for these nodes and put these keys to }}OpenSSH has several authentication mechanisms. The most known one is then you type in the password, which is then checked against the password at the appropriate place on remote sidesystem. [[User:Kir|Kir]] has recently written a script While this is straightforward and does not usually require any additional setup, it is not convenient to facilitate this operationenter the password each time. Take a look:
correct display title, use interwiki for wikipedia link
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 [[wikipedia: Public-key cryptography]].'' ''Your'' OpenSSH public keys are usually stored in <precode>~/.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). If you want to let user Joe at host One to log in as user Bar at host Two, you should put Joe@One's public keys into Bar@Two's <code>~/.ssh/authorized_keys*</code> files. This process can be automated using the following script. == The script == 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. e. do <code>chmod a+x ssh-keyput</code>). <source lang="bash">
#!/bin/bash
#
# ssh-keyput -- set up passwordless openssh login.
#
# Copyright (C) 2001, 2002, 2006 by SWsoft.
done
done
</presource>
[[Category: HOWTO]]