Centos 7 Remote SSH access denied [closed]

浪尽此生 提交于 2019-12-11 23:16:36

问题


I installed Centos7, all fine, till I want to access via SSH, I get always Access Denied.

  1. I get it with the root user, and another new created user
  2. I tested SSH within the LAN, so no firewall issue
  3. For the root user "PermitRootLogin yes" is set.
  4. SSH service is started

... till now, I have no clue what I ignored to set it right to have it working.

I got a look into the secure log. When I try to login with the root user on the LAN, I do like:

ssh root@192.168.2.11

in log I get: invalid user root@localhost from 192.168.2.108

When I try through VPN-tunnel:

ssh root@192.168.2.11

in log I get: invalid user kristoxxxxxxxx

this is my username on my OSX device. why is this one passed?


回答1:


This may be due to RSA or DSA keys, os please delete or backup following files from /etc/ssh director to another one.

ssh_host_dsa_key, ssh_host_dsa_key.pub, ssh_host_key, ssh_host_key.pub, ssh_host_rsa_key , ssh_host_rsa_key.pub etc

Now restart your sshd service

service sshd restart


来源:https://stackoverflow.com/questions/26649712/centos-7-remote-ssh-access-denied

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!