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