重啟
sudo service ssh restart以憑證連線
用ssh-keygen產生公私鑰
用scp把.pub上傳到目標電腦的~/.ssh/底下
scp <id_rsa.pub> <user>@<ip>:~/.ssh/<name>.pub把該檔名寫進authorized_keys
cat ~/.ssh/<name>.pub >> ~/.ssh/authorized_keys取消密碼登入
在被連線機器的/etc/ssh/sshd_config
PasswordAuthentication no然後 重啟
SSH tunneling
ssh -L <自己的port>:127.0.0.1:<port> -i <憑證> <user>@<ip>
就可以在自己 ssh 過去後
把自己的 port 轉到目標的 127.0.0.1:<port> 達到 port forwarding by ssh