1.系統指令行或者iTem2
ssh [email protected] -p 端口
2. 或者編輯
vim ~/.ssh/config
把遠端伺服器添加到config裡面
Host abctest
HostName 192.xxx.xx.x
User root
Port 端口
IdentityFile ~/.ssh/id_rsa
然後把公鑰添加到伺服器的~/.ssh/authorized_keys 檔案裡面
登陸的時候,直接在指令行裡面輸入: ssh abdtest
3.mysql指令行登陸:
mysql -h 192.xx.xxx.xx. x -p3306 -uroot -p
本文轉自rongwei84n 51CTO部落格,原文連結:http://blog.51cto.com/483181/1942363,如需轉載請自行聯系原作者