This article from reprint: Original
[Demand]use SSH (Secureshell) to connect to an Ubuntu (11.10) system on a local virtual machine in a Win7 environment
[Environment]Win7,ubuntu,vmware (8.0)
[Scheme]First make sure that you install and start the SSH service on Ubuntu, and then make sure that the firewall on your Linux system shuts down, and that the Win7 firewall will open properly.
SSH can be downloaded by Google.
Steps:
1, some people say that first in virtual Network editor to do Nat port mapping, in fact, is not required;
Ps-e|grep SSH
1595? 00:00:00 ssh-agent
If the result is only ssh-agent, that means that Ssh-server has not started, general Ubuntu is the default installation of SSH, if not installed, you can
sudo apt-get install Openssh-server
Installing the SSH Service
Sudo/etc/init.d/ssh start
Start the SSH service
2, in the/etc/ssh/sshd_config file, set the Permitrootlogin No|yes to allow the root user to Telnet, otherwise, although can connect, but cannot log on,
3, in the/etc/ssh/ssh_config file can only see the default SSH port is 22, of course you can also modify the port number with the VI command, generally do not have to modify
4. Turn off the Ubuntu Firewall (eanable/disable)
sudo ufw disable
5, through Ifconfig view Uubuntu IP address (very much want Windows ipconfig bar) record the IP address
6, try to ping the IP address of the same step V on Windows (so all goes well, let's continue)
7. Install the previously downloaded SSH client on your win7 machine and start ssh
8, then OK prompt to enter the root password, of course, if your root does not set the password, you can then set the root password through the sudo passwd root command under Ubuntu Terminal, and then successfully connected, At this point you can Win7 and control Ubuntu via SSH without having to turn on the annoying VMware every time.
[problems that can be encountered]
1, not even the general Ubuntu Firewall does not shut down, of course, it may be Win7 firewall problems, or shut down the Win7 firewall or add Port 22 to the new rule inside enable, of course, I did not shut down the Win7 firewall
2, you can also ssh inside with your user login, and then through sudo-u root bash and then enter the password to the root user
Win7 using SSH to connect to a Linux virtual machine