You can go directly to the third step and use the existing software to connect directly.
One, configuration environment
1、 Check if the installation is successful
2、 If it fails
3、 If you still have it installed
Two, connect to the virtual machine | Ubuntu
1、 Create a quick connection:
2、 Then click to connect:
3、 Choose to accept and save:
4、 connection succeeded!
Third, use XShell to connect remotely
1、 download
2、 use
Note: If you downloaded and installed the Ubuntu19.1
mirror like me installed directly, you can skip this big step and go directly to the second step
. Because Ubuntu has been configured by default.
First configure the system settings of Ubuntu19.1:
ssh is a security protocol, mainly used to encrypt remote login session data to ensure the security of data transmission.
If you just want to log in to the SSH of another machine, you only need to install
openssh-client
(ubuntu has a default installation, if not, thensudo apt-get install openssh-client
), if you want to make the machine open SSH service, you need to install itopenssh-server
.
To check if the openssh-server
is installed successfully, enter:
ps -e | grep ssh
If the following figure appears, it means success:
If you see sshd, it means ssh-server has been started. Skip the following two steps directly.
If not, you can start it like this:
sudo /etc/init.d/ssh start
//or
sudo service ssh start
The ssh-server configuration file is located in /etc/ssh/sshd_config
, where you can define the service port of SSH. The default port is 22. You can define other port numbers, such as 222. (Or add a "#" sign to "PermitRootLogin without-password
" in the configuration file, comment it out, and add another sentence "PermitRootLogin yes
")
Then restart the SSH service:
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
Install ssh-server service
sudo apt-get install openssh-server
View the installed services again:
dpkg -l | grep ssh
Then confirm whether ssh-server is started:
ps -e | grep ssh
You can use the command to send the public key to the remote host, so you don't need to enter the password when you connect later.
ssh-keygen
ssh-copy-id 192.168.1.101
The back is the ip
address of your computer. Then it will send the key to your computer.
Here we use tools:
SecureCRTPortable
The download address is here, no points are required, contact me and send it to you privately, or search a lot on the Internet, but there are many viruses:
Open after downloading:
Note that the username here should be this on your Linux:
wsuo@ubuntu:~$
For example, this is wsuo
, understand it, it is the username at the top of your command line.
You can choose to save the password so that you don’t have to enter it every time.
Then the operation here is the same as in the command line of Linux
.
If you think the page is too ugly, the characters are too small, and the characters are garbled, you can refer to my other article to beautify it.
The third update: 20:09:32 on March 10, 2020. The existing software is very mature and convenient. It is recommended to download it directly.
xshell6
During the installation process, you will be asked to enter username
and company name
, just type them in.
Then create a new session:
In the position shown in the figure, enter your ip
address.
The default port number is 22
, which is the default port number of the ssh protocol.
Then click User Authentication:
Just enter your username and password, and a window will pop up to select Trust
.
Then the remote is successful, just like in the command line in your server/virtual machine
.
Recommended Posts