centos6.x remote Login with putty using the key authentication method

Source: Internet
Author: User

1 SSH needs to close SELinux, use the following command:

# Setenforce 0 # temporarily shuts down SELinux and will open after reboot

# vi/etc/selinux/config Modify configuration file to make selinux=disabled

2 shutting down firewall rules

# iptables-f #清除防火墙规则

# Service Iptables Save #保存规则


3 using PUTTYGEN.exe to generate a key pair

1) After opening the software, click Generate to generate the public key, and when generated, the cursor moves back and forth in the progress bar to quickly generate

2) after generating the public key, enter the login name in the key comment field.

3) If password verification is required, enter the password in the Key passphrase field

4) Copy the above public key to the host's ~/.ssh/authorized_keys file, without creating it yourself

5) Click Save Private Key to save the secret to a safe place


4 Login with Putty

1) Open the SSH entry on the left side of the putty and click Auth to import the private key file that you just saved via browse

2) on the left, click Session to enter the host name or IP at host Nmae.

3) Enter session name in saved Session field, click Save, make the next login easy

4) Select the session you just saved click Open Login Host

5) Enter the user name and SSH password to connect the host


Attached: 1 To view whether the SSHD service is enabled for commands

# NETSTAT-ANPT | grep ' sshd ' #有输出则说明已经启动

2 Viewing the status of SELinux

# Getenforce #禁用输出Disabled

3 Configuring SSH

# vi/etc/ssh/sshd_config #配置ssh版本, key digits, port number, etc.

4 commands for SSH key generation

# ssh-t Rsa-f/etc/ssh/ssh_host_rsa_key #生成RSA密钥对

# cat/etc/ssh/ssh_host_rsa_key.pub > ~/.ssh/authorized_keys #导出公钥

5 if SELinux and iptables are configured correctly and the server refused our key appears, check that the public key is properly imported, such as the front ssh-rsa is not copied or incomplete.

This article is from the "Record Drip" blog, please be sure to keep this source http://xiaoqing757.blog.51cto.com/8057447/1730610

centos6.x remote Login with putty using the key authentication method

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.