Connecting to Windows SSH Server
I am a newbie trying out SSH. The scenario is I have 2 machines - Windows 7 PC(开发者_Python百科Desktop) and a VMWare machine (Windows 7). Cygwin installed on both. I am trying to connect the VMWare machine to the desktop. I have installed the OpenSSH server on Desktop server. I verified it is running, using netstat. I modified the Windows firewall, by adding to the Inbound Rules to allow connections for port 22.
My problem is I am unable to connect from the VMWare machine.
$ ssh -v user_name@my_machine
OpenSSH_5.5p1, OpenSSL 0.9.8q 2 Dec 2010
debug1: Connecting to my_machine port 22.
debug1: connect to address my_machine port 22: Connection refused
ssh: connect to host my_machine port 22: Connection refused
What am I doing wrong? What are my options to configure? Any links or answers would be helpful.
Thank you.
WM
Open your command prompt and run the following command: ssh -v Your_User_Name@Your_IP_Address
If response is: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 debug1: Connecting to Your_IP_Address port 22. debug1: connect to address Your_IP_Address port 22: Connection refused ssh: connect to host Your_IP_Address port 22: Connection refused
Then go to the Windows Service called OpenSSH SSH Server is started and running, it is set to manual start as default so it will not be running unless you have started it.
Now run above command again. SSH command will connect to the user.
You should make sure that my_machine allows inbound connection. Check the firewall....
(if you can run this command locally - but not from the other machine it might be that case).
If the ssh server on the Desktop is accessible in the localhost then try this
Desktop <- Desktop Firewall <- VM Firewall <- VM
Try shutting down the firewalls in between one by one to check where the issue starts after then configure accordingly. Remember that the Desktop Firewall rules should be inbound and the VM Firewall is outbound
精彩评论