You are not logged in.
Hi,
sshd on my server won't allow me to log in from my desktop (linux or windows, both use 192.168.1.2 as IP), however other machines with different IPs can gain access.
I've added the name of the desktop to the servers hosts file
192.168.1.2 nightshade.localdomain nightshade
and have a feeling this is causing the problem. Is there any way to fix so that I don't have to re-edit the hosts file as I'm finding this useful elsewhere?
Offline
Hi,
sshd on my server won't allow me to log in from my desktop (linux or windows, both use 192.168.1.2 as IP), however other machines with different IPs can gain access.
I've added the name of the desktop to the servers hosts file
192.168.1.2 nightshade.localdomain nightshade
and have a feeling this is causing the problem. Is there any way to fix so that I don't have to re-edit the hosts file as I'm finding this useful elsewhere?
check hosts.allow and hosts.deny
hosts.allow -
sshd: ALL
hosts.deny -
ALL: ALL: DENY
Offline
Sorry, I should have posted. The host.(allow/deny) files are fine, first thing I checked.
Offline
Sorry, I should have posted. The host.(allow/deny) files are fine, first thing I checked.
no problem, could you post your sshd_config?
Offline
Protocol 2
ListenAddress 0.0.0.0
PermitRootLogin no
AllowGroups wheel
AllowUsers XXXXX XXXXXX
PermitEmptyPasswords no
UsePAM yes
Banner /var/local/sshbanner
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
I'm convinced it's adding the name of the desktop to the servers hosts file thats caused this. If I change the desktop's IP I can log in from the desktop, and if I comment out the offending line in the hosts file, I can login with the IP address.
Offline
What if you just set
192.168.1.2 nightshade
in /etc/hosts?
Offline
When I had another look at the /etc/hosts file, using a different text editor to vim, there was a load of garbage appended on to the end of the nightshade line. Vim didn't display this for some reason. It was the server name and IP address repeated over and over again. Removing this solved the problem.
Offline
When I had another look at the /etc/hosts file, using a different text editor to vim, there was a load of garbage appended on to the end of the nightshade line. Vim didn't display this for some reason. It was the server name and IP address repeated over and over again. Removing this solved the problem.
glad that fixed it! you may want to add (solved) to the end of your subject line.
Offline