Re: [SLUG] I am beginning to lose my hair

From: Matt Miller (mmiller1@mptotalcare.com)
Date: Wed Jan 29 2003 - 15:09:27 EST


On Wed, 2003-01-29 at 14:08, Rock wrote:
> I am unable to ssh or telnet to one of my servers. I can ssh out or
> telnet out to another server but attempts to ssh in get connect refused.
> I am just getting frustrated at this point and am sure I am overlooking
> some very obvious issue. I do not have iptables running at all. Yes
> the system is listening to ports 21 and 23 for telnet as indicated in
> the /etc/services file and that is not working either. Oddly I cannot
> find telnet in the /etc/rc.d/init.d directory as I was expecting. I also
> cannot find the service in the /etc/xinetd.d directory, where I expected
> to find it disabled.
>

1) /etc/services is a list of assigned ports, and not an indication of
ports a box is listening on.
2) Run nmap and/or netstat to determine if a box is listening on port 23
for telnet and port 22 for ssh:
    # This will show what ports are listening and which applications
    have the ports open (run as root).
    $ netstat -pnl | egrep "22|23"
    # From a remote host:
    $ nmap -p 22-23 hostname
3) Run ps to see if telnet/ssh is running:
    $ ps axf | egrep "ssh|telnet"
4) Search for sshd/telnetd to see if you have a variation of the
ssh/telnet daemon(s) installed:
    $ find /usr -name "*telnet*"
    $ find /usr -name "*ssh*"
    
5) If some variation of sshd/telnetd is found, manually run the command
as root:
    $ /usr/sbin/telnetd
    OR
    $ /usr/sbin/sshd

 
6) See if you can ssh/telnet to the host from a remote host after
manually running the command.
    user@remotehost$ ssh <hostname or ip_address>
    user@remotehost$ telnet <hostname or ip_address>
    

-- 

Matt Miller Systems Administrator MP TotalCare gpg public key id: 08BC7B06

-- An improperly trained Samurai dies quickly.




This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:55:47 EDT