要使putty連接ubuntu,需要開(kāi)啟ssh-server.
打開(kāi)終端輸入:
sudo apt-get install openssh-server
ubuntu缺省安裝了openssh-client,所以在這里就不安裝了,如果你的系統(tǒng)沒(méi)有安裝的話,再用apt-get安裝上即可。
然后確認(rèn)sshserver是否啟動(dòng)了:
ps -e |grep ssh
如果只有ssh-agent那ssh-server還沒(méi)有啟動(dòng),需要/etc/init.d/ssh start,如果看到sshd那說(shuō)明ssh-server已經(jīng)啟動(dòng)了。
ssh-server配置文件位于/ etc/ssh/sshd_config,在這里可以定義SSH的服務(wù)端口,默認(rèn)端口是22,你可以自己定義成其他端口號(hào),如222。然后重啟SSH服務(wù):
sudo /etc/init.d/ssh resart
設(shè)置putty中文亂碼