Detailed explanation of using Xshell to connect to Ubuntu

Xshell is a secure terminal emulation software that enables remote login. My main purpose of using XShell is to log in to Linux terminal in Windows environment and transfer some large files to Linux environment.

1. Download and install the xshell client. You can choose the personal/school free version during installation, so you don't need to pay.

2. After the installation is complete, if you directly connect to the Ubuntu host, you will find that you cannot connect. This is because the SSH service is not enabled on the Ubuntu host, and openssh-server needs to be enabled:

root@ubuntu:~# sudo apt-get install openssh-server

use

root@ubuntu:~# ps -e | grep ssh

If only ssh-agent indicates that it has not been started, it needs to be

root@ubuntu:~# /etc/init.d/ssh start

If sshd is displayed, it means that it has been started successfully.

3. Open Xshell, select "New", select SSH in the "Connection" setting, and fill in the IP address of the host to be connected to the host. Fill in the available username and password to log in to Ubuntu in "User Authentication".

Note: If you confirm that there is no problem with the entered user name and password, but the login still displays the following situation, rejecting your entered password:

You need to edit the /etc/ssh/sshd_config file:

root@ubuntu:~# /etc/ssh/sshd_config

Change PermitRootLogin to yes:

Change it to:

Then restart ssh-server:

root@ubuntu:~# sudo /etc/init.d/ssh restart

If that doesn't work, restart the virtual machine and you should be able to connect.

 The solution to the problem of displaying Chinese garbled characters when   XShell connects to CentOS 7.2http ://www.linuxidc.com/Linux/2017-03/141385.htm

Change method after Xshell automatically saves the user namehttp:  //www.linuxidc.com/Linux/2017-04/143030.htm

How does Xshell 5 connect to a local virtual machine   http://www.linuxidc.com/Linux/2016-08/134087.htm

XShell uploads files locally to Ubuntu and downloads files from Ubuntu to the local   http://www.linuxidc.com/Linux/2017-06/145191.htm

Ubuntu virtual machine NAT mode connection Xshell under VMware   http://www.linuxidc.com/Linux/2016-09/135366.htm

Xshell5 connects to Ubuntu in VirtualBox virtual machine   http://www.linuxidc.com/Linux/2016-08/134086.htm

Xshell connects to local VirtualBox Ubuntu   http://www.linuxidc.com/Linux/2017-04/142445.htm

Log in to the Linux server using XShell key authentication   http://www.linuxidc.com/Linux/2017-06/144405.htm

This article permanently updates the link address : http://www.linuxidc.com/Linux/2017-08/146222.htm

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325337096&siteId=291194637