SSH登錄TX2

一:TX2端的操作

1.安裝openssh-server

sudo apt-get install openssh-server

2.確認sshserver是否啓動:

ps -e |grep ssh

如果看到sshd那說明ssh-server已經啓動了。
如果沒有則可以這樣啓動:

sudo /etc/init.d/ssh start

3.ssh-server配置文件位於/etc/ssh/sshd_config,在這裏可以定義SSH的服務端口,默認端口是22,你可以自己定義成其他端口號,如222:
如果配置該文件需要重啓SSH服務:

sudo /etc/init.d/ssh restart

4.設置固定IP地址(192.168.1.10)

參考:https://www.cnblogs.com/qilai/p/11285445.html 

把其中的wlan0換成eth0即可。

 

二:主機(windows)端的操作

1.下載並安裝MobaXterm軟件

2.設置windows端ip地址及其網關

3.關掉防火牆,測試是否能ping通TX2

ping 192.168.1.10

4.使用MobaXterm的ssh功能連接TX2

參考:https://blog.csdn.net/u011041963/article/details/81698357

 

三:能ping通但連不上ssh的可能解決辦法:

1、重新安裝openssh-server,參考:https://blog.csdn.net/bcqtt/article/details/51670601

2.在TX2端重新配置一下ssh:

sudo gedit /etc/ssh/sshd_config

在末尾添加:

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,[email protected]

然後重啓SSH服務:

sudo /etc/init.d/ssh restart

 

ref:

https://www.cnblogs.com/chay/p/10298017.html

https://blog.csdn.net/bcqtt/article/details/51670601

https://blog.csdn.net/u011041963/article/details/81698357

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章