ssh tutorial


Author: yifei / Created: May 30, 2017, 9:21 a.m. / Modified: May 30, 2017, 9:40 a.m. / Edit

配置文件

路径: ~/.ssh/config

权限必须设置成: .ssh/ 700,.ssh/authorized_keys 600, .ssh/config 600

添加一个 host 到配置中

Host HOSTNAME or *
    HostName  
    Port           
    User          
    IdentityFile    
    ServerAliveInterval    240

这样就可以直接 ssh HOSTNAME

ssh command line

ssh [-i Identitty_file] [-o options] username@host [command]

StrictHostKeyChecking=no # sets check host key to false

other

mosh is a drop-in replacement for ssh. mosh --server=~/bin/mosh-server user@remote-host

when copying files from remote host A to remote host B, you use ssh -3

use ssh-keygen and ssh-copy-id, do not manually copy id_rsa.pub to remote host.

Gotchas

error: key_read: uudecode may be caused by disk full.


有任何问题可以发邮件到 kongyifei (at) gmail.com 讨论