Simple SSH configuration under centos6.3 and login using securecrt

Source: Internet
Author: User

Environment Description:
Host system: win7_pro_bit32; Virtual Machine: virtualbox4.1.16; Virtual Machine System: centos_shorttop_6.3final; SSH client: securecrt6.6.1.289
Certificate ----------------------------------------------------------------------------------------------------------------------------------

The centos installation is skipped, and the Enhancement Tool is installed.

1. Confirm that SSH has been installed in the system (installed by default). Run the command: rpm-Qa | grep ssh;

2. If SSH is not installed, run the command: Yum Install SSH;

3. After installation, modify the connection port and protocol and run the command VI/etc/ssh/sshd_config. Specifically, port 22 specifies the port number for the SSH connection. Protocol 2 and 1 allow the connection between SSH1 and SSH2, the default value is protocal 2;

4. Modify hosts. Deny In The/etc directory and add sshd: All in the last line;

5. Modify hosts. allow in the/etc directory and add sshd: All in the last line. If you want to install an IP address that can restrict access, set it as follows:

Sshd: 192.168.0.101;

Sshd: 192.168.0.102;

6. Start SSH and run the command:/etc/init. d/sshd start.

Certificate --------------------------------------------------------------------------------------------------------------------------------------

In step 3, the system may prompt "sshd re-exec requires execution with an absolute path". If you try to enter the absolute path "/usr/sbin", an error is still returned. The solution is as follows (regenerate the key ):
# Ssh-keygen-t dsa-F/etc/ssh/ssh_host_dsa_key
# Ssh-keygen-t rsa-F/etc/ssh/ssh_host_rsa_key
#/Usr/sbin/sshd
After the key is generated, restart (command: Service sshd start ).

PS: 1. Use the root permission to start the service.

2. After the process is forcibly shut down to the root user, run the command: Skill-9 XX (process number) to force the SSH process to be shut down.

3. Check whether the SSH service is enabled. Run the command PS-E | grep ssh;

4. query the port corresponding to the SSH process and run the command: PS aux | grep SSH;

5. There are many securecrt configurations online.

References: http://www.cnblogs.com/trams/archive/2012/04/29/2476175.html

 

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.