cygwin+ssh安裝

http://www.blogjava.net/Man/archive/2012/11/26/392004.html

 

ssh 作爲服務器,開啓失敗可以查看日誌:var/log/sshd.log
正確的安裝:
先uninstall 在install (注意全部的cygwin都關掉的情況下。)


tplink@tplink-PC1 ~
$ ssh-host-config

*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) no
*** Info: Updating /etc/sshd_config file

*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: []
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires.  You need to have or to create a privileged
*** Info: account.  This script will help you do so.

*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later.  On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).

*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.

*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.

*** Info: The following privileged accounts were found: 'cyg_server' .

*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Please enter the password for user 'cyg_server':
*** Query: Please enter the password for user 'cyg_server':
*** Query: Please enter the password for user 'cyg_server':
*** Query: Reenter:


*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account.  To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'.  Otherwise, it will start automatically
*** Info: after the next reboot.

*** Info: Host configuration finished. Have fun!

tplink@tplink-PC1 ~
$ net start sshd
CYGWIN sshd 服務正在啓動 .
CYGWIN sshd 服務已經啓動成功。


tplink@tplink-PC1 ~
$

 

ubuntu下面使用靜態ip方法:

http://os.51cto.com/art/201210/361003.htm

主要是設置一下文件:

1. 啓動虛擬機Ubuntu系統,打開終端,利用如下命令打開並編輯網絡接口配置文件:

sudo vi /etc/network/interfaces

2. 編輯文件如下:

auto lo
iface lo inet loopback

# Assgin static IP by eric on 26-SEP-2012
iface eth0 inet static
address 192.168.91.200 #change to your static IP
netmask 255.255.255.0  #change to your netmask
gateway 192.168.91.2    #change to your getway
#We must specify dns-nameserver here
#in order to get internet access from host
dns-nameservers 192.168.91.2
auto eth0

 

 

發佈了208 篇原創文章 · 獲贊 21 · 訪問量 27萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章