Ubuntu6.10 Configuration

Source: Internet
Author: User
Server: apt-getinstallssh edit/etc/ssh/sshd_config # ServerKeyBits768 locate this line and remove "#" at the beginning of the line, change 768 to 1024 bytes ServerKeyBits1024 bytes and change it to this state. Change the ServerKey strength to 1024 bit PermitRootLoginyes bytes to find this line and remove the "#" at the beginning of the line, change "yes" to "no listeners Per server:
Apt-get install ssh
Edit/etc/ssh/sshd_config
# ServerKeyBits 768 rows find this line, remove "#" at the beginning of the line, and change 768 to 1024
Bytes
Changed ServerKeyBits 1024 bytes to this status, and changed the ServerKey strength to 1024 bits.
PermitRootLogin yes then find this line, remove "#" at the beginning of the line, and change "yes" to "no ".
Bytes
PermitRootLogin no logs is changed to this status and cannot be logged on using root.
PermitEmptyPasswords no longer find this row and delete the line header "#". Empty Password Logon is not allowed.
Bytes
PermitEmptyPasswords no. Changed to this status. Do not log on with a blank password.
# PasswordAuthentication yes locate this line and change yes to no
Bytes
PasswordAuthentication no. login is changed to this status, and password-based logon is not allowed.
Create a public key and a private key as an ordinary user:
Ssh-keygen-t rsa
Then ask you to confirm the key file name (use the default one), enter the password, and enter the password again.
In ~ /. Ssh/will generate the Public Key id_rsa.pub and private key id_rsa
Change the Public Key File Name: mv id_rsa.pub authorized_keys
Set file attributes: chmod 400 authorized_keys
Restart the ssh service:/etc/init. d/ssh restart
Move the private key id_rsa to the client
Client:
Apt-get install ssh
Mkdir ~ /. Ssh/
Chown user: user ~ /. Ssh/
Chmod 700 ~ /. Ssh/
Move the private key file ~ /. Ssh/in
Chown root: root ~ /. Ssh/id_rsa
Chmod 644 ~ /. Ssh/id_rsa
Ssh logon method:
Ssh remote host username @ IP address of the remote host
Enter Password

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.