ssh

ssh copy id

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub name@host

如果你有多个服务器的话,

# zsh 写入命令
function ssh2(){
    cmd="ssh name@子网."$1
    eval $cmd
}

以后只需要ssh2 101就会自动帮你登录了。

你可能感兴趣的:(linux)