--- a/ssh.rst Sat Jan 09 19:50:03 2016 +0200
+++ b/ssh.rst Sat Jan 09 20:50:54 2016 +0200
@@ -27,11 +27,24 @@
$ ssh-keygen -p -N "newphrase" -P "oldphrase" -f ~/.ssh/id_dsa
# change passphrase of priv key
+Coping and deleting public keys.
+================================
+
+To copy your public key to remote host (for automatic login by pubkey
+authentication)::
+
$ ssh $user@$host cat ">>" "~/.ssh/authorized_keys" <~/.ssh/id_rsa.pub
# public pub key on remote host
$ ssh-copy-id $user@$host # alternative to previous command
+To remove ``known_hosts`` key (usually need if you change server pubkey or
+change server)::
+
+ $ ssh-keygen -R hostname
+ $ ssh-keygen -R hostname -f ~/.ssh/known_hosts
+
+
Shell login.
============
::