Install SSH service
There is no SSH service installed in Ubuntu by default. If you connect to Ubuntu via SSH, you need to manually install sSH-Server yourself. To determine whether to install SSH service, the following command can be used:
There is no SSH service installed in Ubuntu by default. If you connect to Ubuntu via SSH, you need to manually install sSH-Server yourself. To determine whether to install SSH service, the following command can be used:
- : www.linuxidc.com@linuxidc:~$SSH localhost SSH: connect to host localhost port 22: Connection destination: Connection union
As shown above, it means that it has not been installed yet. It can be installed through APT. The command is as follows:
- : www.linuxidc.com@linuxidc:~$sudo apt-get install openssh-server
The system will be installed automatically. After the installation is completed, the service will be started first:
- www.linuxidc.com@linuxidc:~$sudo/etc/init. D/SSH start ol>
After startup, you can check to see if the service started correctly with the following command
Ps
- www.linuxidc.com@linuxidc:~$- e | grep SSH 6212?00:00:00 SSHD ol>
As indicated above, start OK. Note that the default port for SSH is 22. You can change the port, stop,
and then start. The configuration is under /etc/ssh/sshd_config, as shown below.
- www.linuxidc.com@linuxidc:~$vi /etc/ SSH /sshd_config # Package generated configuration file # See the SSHD (8) manpage for details # What ports, IPs and protocols we listen for Port 22 ol>
Finally, it’s time to connect. See the following command:
SSH [email protected]
- www.linuxidc.com@linuxidc:~$ ol>
Disconnect:
The
- exit ol>
Log into the virtual machine via Putty
First of all, make sure that the virtual machine and host can ping each other. If you can’t ping the general, then the follow-up work cannot be carried out. You can search the Web for references to articles on VIRTUAL machine IP configuration
Next, open the Putty client and the following interface appears. Fill in the relevant parameters:
Where the IP address is the IP address of Ubuntu in the virtual machine.
finally click Open to enter Putty, enter the user name and password to log in.
Read More:
- VMware virtual machine installation of vmware tools, VMware shared folder location
- Solve the problem that the virtual machine can’t be opened? Tips on VMware Workstation cannot connect to the virtual machine
- linux VMware Unable to change virtual machine power state: Internal error
- Record of solutions to internal error when VMware starts virtual machine
- Ubuntu xshell cannot connect to VMware virtual machine solution
- How to Fix VMware Taking ownership of this virtual machine failed
- Nat mode of network configuration for VMware virtual machine
- The solution of centos7 in VMware virtual machine unable to access after installing nginx
- Quickly solve the problem of Vmware virtual machine “\\.\Global\vmx86”: the system cannot find the specified file
- VMware virtual machine prompt: locking file failed, unable to open the disk solution
- VMware imports an external virtual machine and displays system error: (unknown exception). Wrong solution
- VMware failed to lock memory file. Error restoring virtual machine state from file
- How to solve the problem of “unable to open / dev / vmmon: broken pipeline” when running VMware virtual machine?
- Problem solving: this application cannot run under a virtual machine arcmapr, but you are not using a virtual machine
- Linux virtual machine network “job for” network.service failed because the control process exited with error code”
- The solution to the problem that the virtual machine and the host SSH can’t connect on vmvare
- Install Xen virtual machine using virt-manager
- (Virtual machine monitor failed and Virtual ethernet failed)
- Nmap enumerates remote machine open ports
- VirtualBox reports an error supr3hardenedwinrespawn what 5 when opening the virtual machine