[Ilugc] ssh connection: port 22 problem

  • From: jemenisuresh@xxxxxxxxx (Tha.Suresh)
  • Date: Thu, 31 Mar 2011 20:27:28 +0530

On Thu, Mar 31, 2011 at 7:41 PM, <lug at chandrashekar.info> wrote:

Hi Suresh,

 I don't know how to see the log files. I didn't find any file related to
 "sshd". These are the files that i've found in the "/var/log",

You might want to look up /var/log/messages and /var/log/secure
files.

Try 'grep sshd /var/log/messages | tail'


[root at mercury log]# grep sshd /var/log/messages | tail
Mar 31 15:34:47 mercury setroubleshoot: SELinux is preventing /usr/sbin/sshd
"name_bind" access . For complete SELinux messages. run sealert -l
44f7ecec-f09d-47e5-8fed-8cb9f929f4bb

**(But i disabled the SElinux by editing "/etc/selinux/config )**



and
'grep ssh /var/log/secure | tail'


[root at mercury log]# grep ssh /var/log/secure | tail
Mar 31 17:10:18 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/etc/init.d/sshd start
Mar 31 17:10:39 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/usr/bin/yum install openssh-client
Mar 31 17:13:04 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/usr/bin/yum install openssh-clients
Mar 31 17:35:49 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/etc/init.d/sshd start
Mar 31 17:37:24 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/etc/init.d/sshd restart
Mar 31 17:37:24 mercury sshd[27190]: Received signal 15; terminating.
Mar 31 17:37:25 mercury sshd[24192]: Server listening on 0.0.0.0 port 2222.
Mar 31 18:16:28 mercury sudo:   suresh : TTY=pts/0 ; PWD=/home/suresh ;
USER=root ; COMMAND=/sbin/service sshd start
Mar 31 18:30:48 mercury sshd[24192]: Received signal 15; terminating.
Mar 31 18:32:00 mercury sshd[1752]: Server listening on 0.0.0.0 port 2222.




and check for any possible issues.
  'pgrep sshd'


Yes sir, i got the "PID" as 1752




Assuming that sshd is running on the host, try 'tail -f /var/log/secure'
and try connecting from the remote machine using ssh. Check
up the message displayed in /var/log/secure.


I tried it. But i didn't get any output


This should help us diagnose the problem better.


-- 
Regards,
Tha.Suresh

Cooool Linux Tips & Tricks,
http://gnutips.wordpress.com

My experiences with Linux are here,
http://thasulinux.wordpress.com

Other related posts: