Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-03-2013, 12:23 PM
|
#1
|
Member
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541
Rep: 
|
sshd debug mode
Hi All,
Server: CentOS 6.4 x86_64
Client: Ubuntu 13.04
I was trying SFTP Chroot Jail, and while doing so, i ran into some problems. So i wanted to debug ssh connection - to know why i am not able to connect? In the end, i solved the problem. But while searching internet on how to debug sshd, i came across many tutorials like this one ' How can I run Openssh daemon in debug mode?'.
But i am not getting any debug messages at all.
This is what i did: (Pls see attached ScreenShot) - (Left-Top): On Server, issued command '/usr/sbin/sshd -p 12345 -D -d -e', to start ssh daemon in debug mode.
- (Left-Bottom): From client, ssh to server as wrong user and also as correct user. I was hoping that debug messages will scroll up on server monitor. But nothing happened... not even cursor moved.
- (Right): So, to verify, i opened /var/log/secure file, and everything seems fine. all the right noises are made.
What i'm doing wrong? Am i wrong that i am expecting some messages will scroll on server monitor in debug mode? Where are debug messages shown...
Any help will be much appreciated.
Thanks
|
|
|
10-03-2013, 12:30 PM
|
#2
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
Looks to me like you forgot to specify the port in the ssh connection (-p 12345 on the ssh command)
|
|
|
10-03-2013, 12:42 PM
|
#3
|
Member
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541
Original Poster
Rep: 
|
Quote:
Originally Posted by jpollard
Looks to me like you forgot to specify the port in the ssh connection (-p 12345 on the ssh command)
|
I did try. but it throws error.
Code:
$ ssh -p 12345 madhu@cent
ssh: connect to host cent port 12345: No route to host
$ ssh -p 12345 madhu@192.168.1.50
ssh: connect to host 192.168.1.50 port 12345: No route to host
But if you look at '/var/log/secure' file (right-window), i'm getting response. all three windows are in real-time.
|
|
|
10-03-2013, 03:24 PM
|
#4
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
IN the past, when I've done this, sshd does not log to anything but the terminal running sshd in the debug mode.
All the others are using the default port, therefore I would expect those are from the ssh without the port specification.
It is possible for a router/firewall to be blocking access to port 12345 (I have seen some reports where it happens).
|
|
1 members found this post helpful.
|
10-03-2013, 03:32 PM
|
#5
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
+1 to jpollard's post; I had nearly the same exact issue arise on me about two weeks ago, and my firewall on my network was at fault the whole time. Tip: When you are using odd port numbers for ssh, remember to account for that in your firewall 
|
|
1 members found this post helpful.
|
10-03-2013, 03:56 PM
|
#6
|
Member
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541
Original Poster
Rep: 
|
Quote:
Originally Posted by jpollard
It is possible for a router/firewall to be blocking access to port 12345 (I have seen some reports where it happens).
|
You hit the bull's-eye!!! As corp769 also mentioned, it was iptables blocking it. Stopped iptables to check - Bhoom... server teminal started talking...
Thanks-a-lot
|
|
|
10-03-2013, 03:59 PM
|
#7
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
I'm actually quite happy I replied to that post! ... I forgot to finish that server, so I got up off my lazy @ss and finished it. Cheers?
And kudos on getting that working!
|
|
|
All times are GMT -5. The time now is 08:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|