Linux ssh遠程登錄

確保安裝了openssh-server,沒安裝先執行安裝命令安裝服務器

yum install openssh-server

編輯sshd_config配置文件ssh

sudo vi /etc/ssh/sshd_config

找到這些去掉前面的#號tcp

重啓ssh學習

systemctl sshd restart

打開22端口spa

開啓22端口
firewall-cmd --zone=public --add-port=22/tcp --permanent
重啓防火牆
firewall-cmd --reload

 查找本機iprest

ifconfig

第二臺機器。先嚐試是否能夠ping的通次服務器code

 ping 192.168.1.215

ssh遠程登錄server

//ssh 登錄名@ip
ssh root@192.168.1.215


此隨筆乃本人學習工做記錄,若有疑問歡迎在下面評論,轉載請標明出處。blog

若是對您有幫助請動動鼠標右下方給我來個贊,您的支持是我最大的動力。 ip

相關文章
相關標籤/搜索