The newly installed CentOS 7 uses SSH to connect to Access denied, record this pit.
The detailed questions are as follows (see picture):
Solution
After checking the information, the Linux system prohibits remote login by default. Then just open the permissions.
Because the system settings need to be modified, ordinary users will not have permission, so operate under the super administrator, enter su root and enter the password (as shown in the figure):
Install openssh-server
yum -y install openssh-server
1
Check the SSH version
ps -e |grep ssh
1
See the figure below: ssh-server has been installed successfully.
insert image description here
Edit the configuration file:
vim /etc/ssh/sshd_config
1
modify PermitRootLogin to yes
Exit editing:
Press the 'Esc' key, enter ":wq", and press Enter.
1
Restart SSH:
systemctl restart sshd
1
You're done, you can use ssh to link