Ubuntu under SSH settings

Source: Internet
Author: User
Tags filezilla openssh server ssh secure shell



There are many online articles on the Internet to open the SSH service, but most of the methods introduced are not ideal after testing, can not realize remote login to Ubuntu, the final analysis is not really open Ssh-server services. The ultimate success method is as follows:

Installing OpenSSH Server under Ubuntu is an incredibly easy thing to do, requiring only one command:
  sudo apt-get install Openssh-server

(View the returned results, and if there is no error, enter the IP address of your server with the SSH client software, such as Putty, SecureCRT, SSH Secure Shell client, and so on.) If all goes well, wait a moment to connect. And you should be able to log in using your existing username and password. )

Then confirm that the Sshserver is started: (or with "NETSTAT-TLP" command)

  Ps-e | grep ssh

If only ssh-agent that Ssh-server has not started, need to/etc/init.d/ssh start, if you see the sshd that shows that Ssh-server has been started.

Ssh-server configuration file is located in/Etc/ssh/sshd_config, where you can define the SSH service port, the default port is 22, you can define yourself as a different port number, such as 222. Then restart the SSH service:

  Sudo/etc/init.d/ssh Resart

In fact, if there are no special needs, here OpenSSH Server is installed. But setting it up further can make the OpenSSH logon time shorter and more secure. All of this is done by modifying the OpenSSH configuration file sshd_config.
First of all, when you experiment with remote login, you may find that you will have to wait a long time after entering your username to prompt for a password. In fact this is because sshd needs to reverse the client's DNS information caused. We can greatly increase the speed of login by disabling this feature. First, open the Sshd_config file:
sudo nano/etc/ssh/sshd_config
Find the GSSAPI Options section and comment out the following two lines:
#GSSAPIAuthentication Yes #GSSAPIDelegateCredentials No and then restart the SSH service:
Sudo/etc/init.d/ssh restart
Try again, it should be very fast.
Using PuTTy to log on to the server with certificate authentication
SSH service, all the content is encrypted transmission, security is basically guaranteed. However, if you can use certificate authentication, security will be higher, and after certain settings, but also to achieve the effect of automatic login certificate certification.
First modify the Sshd_config file to turn on the certificate authentication option:
Rsaauthentication Yes Pubkeyauthentication Yes Authorizedkeysfile%h/.ssh/authorized_keys after the modification is complete, restart the SSH service.
Next we need to establish a private key and public key for the SSH user. First of all to login to the account that needs to establish the key, here note the exit root user, need to use the SU command to switch to another user. Then run:
Ssh-keygen
Here, we will store the generated key in the default directory. The establishment of the process will be prompted to enter passphrase, which is equivalent to the certificate to add a password, but also to improve security measures, so that even if the certificate was accidentally copied away is not afraid. Of course, if this is left blank, then you can implement PuTTy through certificate authentication automatic login.
The Ssh-keygen command generates two keys, first we need to rename the public key to the server:
CD ~/.ssh MV Id_rsa.pub Authorized_keys then copy the private key id_rsa from the server and delete the Id_rsa file on the server.
The settings on the server are finished, and the following steps need to be done on the client computer. First, we need to convert the Id_rsa file to the PuTTy supported format. Here we need to use the PuTTyGEN tool:
Click the Load button in the PuTTyGen interface, select the Id_rsa file, enter passphrase (if any), then click the Save privatekey button so that the PuTTy accepted private key is ready.
Open PuTTy, enter the server's IP address in the Session, click the Browse button under Connection->ssh->auth, and select the private key that you just generated. Then go back to the Connection option and enter the user name that the certificate belongs to in Auto-login username. Go back to the Session tab and enter a name to save the session. Click on the bottom of Open should be able to log on to the server through certificate authentication. If there is passphrase, the login process will require input passphrase, otherwise it will be directly logged on to the server, very convenient.

Use Ubuntu ssh to telnet to Ubuntu machine on Windows machine download PuTTY
How to copy files/folders from/To a remote Ubuntu machine on a Windows machine download FileZilla

Source of Material:

http://mxsfengg.javaeye.com/blog/543000

Http://www.hackbase.com/tech/2009-03-22/51769.html

FileZilla connecting SFTP using SSH key authentication2007-01-28 00:00:00View OriginalBecause FileZilla uses putty to connect to SFTP server. So if you want to use SSH key in FileZilla, please add your private key in Putty's default Settings->ssh->auth. Save it. If you generated SSH key has passphrase, please add passphrase in the FileZilla password input box, save can be used.

Ubuntu under SSH settings

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.