SSH: connect to host localhost port 22: connection reused
1.Problem description
I used to use the pagoda panel on the service before, but today I had a whim to use the pagoda panel on my computer. (the pagoda panel is really easy to use, especially for my ZZ little white)… But after installing the pagoda panel, when I started the terminal of the panel, I found that when I entered the SSH user name and password, there was no response, and the password and account number were clearly right
some people may want to ask, you TM use the pagoda panel on this machine, but also use the terminal of the pagoda, isn’t it unnecessary,, emmm is indeed, but I just like to do too much… Now that I find this problem, let’s try how to solve it
2. Problem solving
the possible reasons are: the port is not opened, the local firewall refuses, and the local machine has no SSH service
finally, the problem is that there is no SSH service on this machine, right! No, SSH is often used when you use Linux, but this machine may not have SSH service, so we need to install SSH service
generate SSH secret key
$ ssh-keygen -t rsa (Press enter evenly to generate the secret key)
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
install openssh server (take Ubuntu operating system as an example)
$ sudo apt install openssh-server
$ sudo /etc/init.d/ssh start
Test
$ ps -ef | grep ssh(View sshd process)
$ ssh 127.0.0.1
3. Success:
as shown in the figure:
if you have any questions, please leave a message, and you will help solve them when you see them
Similar Posts:
- Install SSH in Ubuntu in VMware (solve connect to host localhost port 22: connection reused)
- Solutions to Ubuntu forgetting password and root password
- [Solved] Connect to Ubuntu Error Via xshell: Could not connect to ‘xxxxx’ (port 22)
- [Solved] Git Could not read from remote repository.Please make sure you have the correct access rights
- sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, q…
- [Solved] Ubuntu Warning: The system is running in low-graphics mode
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- Bt-Panel Type error: cannot concatenate ‘STR’ and ‘nonetype’ objects
- Causes and solutions of system program problem detected in Ubuntu startup display
- When installing MySQL database on Mac OS, the system prompts MySQL: command not found