Server A 至 Server B 不用輸入帳號密碼
Server A上的設定
ssh-keygen -t rsa 或 ssh-keygen -d (dsa) => 產生出 id_rsa, id_rsa.pub
scp id_rsa.pub ServerB:~/.ssh/
ssh-keygen -t rsa 或 ssh-keygen -d (dsa) => 產生出 id_rsa, id_rsa.pub
scp id_rsa.pub ServerB:~/.ssh/
Server B上的設定
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
懶人作法
ssh-keygen
cd .ssh
cp id_rsa.pub authorized_keys
scp -r .sshhostname:
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
懶人作法
ssh-keygen
cd .ssh
cp id_rsa.pub authorized_keys
scp -r .ssh