How does Putty prompt timedout when connecting to Linux?

Source: Internet
Author: User
Let's talk about the related situation first. When using putty to connect to Ubuntu, the system prompts: Connectionerror: Connectiontimedout, which means the connection times out !~ Later, I checked on the Internet and said that the ssh service was not started after the previously installed ssh protocol was restarted. Okay, start the ssh service servicesshdstart or/etc/init. d/sshstart to start.

Let's talk about the situation first.

When you use putty to connect to Ubuntu, the following error occurs: Connection error: Connection timed out.

The connection times out !~

Later, I checked on the Internet that the ssh service was not started after the previously installed ssh protocol was restarted,

Okay, start the ssh service sshd start or/etc/init. d/ssh start.

This prompt is found after startup

Cocould not load host key:/etc/ssh/ssh_host_rsa_key
Cocould not load host key:/etc/ssh/ssh_host_dsa_key

I don't understand this either. Maybe the two files do not exist.

Search for the files on the Internet and use the following command to recreate the files.

Enter ssh-keygen-t dsa-f/etc/ssh/ssh_host_dsa_key in the terminal to recreate the ssh_host_dsa_key file.

The following information is returned:


Generating public/private dsa key pair.

Enter passphrase (empty for no passphrase) :( press Enter)

Enter same passphrase again:

Your identification has been saved in/etc/ssh/ssh_host_dsa_key.

Your public key has been saved in/etc/ssh/ssh_host_dsa_key.pub.

The key fingerprint is:

Xx: xx root@localhost.localdomain

Enter ssh-keygen-t rsa-f/etc/ssh/ssh_host_rsa_key in the terminal to recreate the ssh_host_rsa_key file.

The following information is returned:

Generating public/private rkey pair.

Enter passphrase (empty for no passphrase) :( press Enter)

Enter same passphrase again:

Your identification has been saved in/etc/ssh/ssh_host_rsa_key.

Your public key has been saved in/etc/ssh/ssh_host_dsa_rey.pub.

Root@localhost.localdomain

Note: The preceding two commands do not work for common users. You must use the root permission.

By default, root is disabled. You can use the following command to enable the root account

Enter sudo passwd root (Press ENTER) under the terminal command line of a common user and enter the password twice for confirmation.

Finally, use the above method to start the ssh service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.