SSH login problem

Issues related to applications and software problems
Post Reply
peressa
Posts: 2
Joined: 2018/02/19 17:07:33

SSH login problem

Post by peressa » 2018/02/19 17:10:37

Hi, I have a problem with logging in to centos via ssh. I can log in inside the network, but I can not be outside the network. I get a login, enter my login, enter my login password and I have the "access denied" message. What is the problem?
Please help.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: SSH login problem

Post by lightman47 » 2018/02/19 21:10:28

are you attempting to be 'root'? If so, logn as a normal user, then 'su' to root once in. Well worth the extra step for your system security (check /var/log/secure to see attempts to get in with the root account).

peressa
Posts: 2
Joined: 2018/02/19 17:07:33

Re: SSH login problem

Post by peressa » 2018/02/20 05:19:29

Thank you for your answer, unfortunately logging in to another user account also gives a message "access denied"
. In configuration I have enabled logging in to root via ssh.

larwood
Posts: 66
Joined: 2011/07/27 12:07:30
Location: Perth WA, Australia

Re: SSH login problem

Post by larwood » 2018/02/20 06:55:43

Check your logs:
/var/log/secure

Check your config files for allow and deny related to network subnets:
/etc/hosts.allow
/etc/hosts.deny
/etc/ssh/sshd_config

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: SSH login problem

Post by avij » 2018/02/20 15:10:12

Is there some sort of a NAT involved? If you, for example, run ssh www.example.com to access your webserver via ssh, chances are that you are actually connecting to your NAT router when you try to do that from outside your network. The router may forward http and https ports to the web server in your LAN, that's why the web server's connectivity may be different. Just a guess, there may be other reasons as well.

Post Reply