其安裝流程,請參照
http://blog.faq-book.com/?p=2731
或是將cygwin中,選擇
Admin → cygrunsrv
Net → openssh
A.其執行步驟
設定PC(server)的權限
1.新增使用者及權限等.
2.新增環境變數
3.設定通訊埠(for win7/win xp,參照上面連結內容)
對輸出/輸入 來新增其規則(ssh port 22)
B.設定其檔案的權限
$ chmod +r /etc/passwd
$ chmod u+w /etc/passwd
$ chmod +r /etc/group
$ chmod u+w /etc/group
$ chmod 755 /var
$ touch /var/log/sshd.log
$ chmod 664 /var/log/sshd.log
C.執行ssh-host-config安裝(預設成yes即可)
$ net start sshd(開啓ssh)
D.Windows本機的帳密和cygwin同步
mkpasswd -cl > /etc/passwd
mkgroup --local > /etc/group
E.檢查是否成功設定
ssh localhost
由遠端連線(這裡由local network)
用常見的putty(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
參考:
使用ssh
http://www.ascc.sinica.edu.tw/putty
tmux config
https://gist.github.com/MohamedAlaa/2961058
http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/
沒有留言:
張貼留言