LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-29-2006, 02:52 AM   #1
fnoyan
LQ Newbie
 
Registered: Sep 2004
Posts: 23

Rep: Reputation: 15
ssh problem


Hi

I have two hosts connected to the same hub. I am trying to connect one host to another with ssh but the server does not respond to my connection requests.

I listen the interface of the server connected to the HUB and see that it receives the connection requests from the client.

Both hosts allow all the packets from INPUT and OUTPUT chains. The iptables configuration is as follows
Code:
 iptables -F
 iptables -A INPUT -j ACCEPT
 iptables -A OUTPUT -j ACCEPT
I can ping from one host to other from both two machines. I can connect the host machine by using a ssh client on the server. But from client to server I cannot connect!

The sshd_config files on both ends are default.

What may be the problem!

Thanks...
 
Old 05-29-2006, 02:55 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
run tcpdump on the server and see if it recives the connections. i'd be guessing that either sshd isn't running in the first place or you have used the wrong ip address.
 
Old 05-29-2006, 03:01 AM   #3
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
My guess is that the ssh daemon is not started on the machine you call "server". Try something like "/etc/init.d/sshd start".

If this is not the problem, a complete error message would help. Running ssh client in command line with the "-v" option might give you some valuable info as well.
 
Old 05-29-2006, 03:01 AM   #4
fnoyan
LQ Newbie
 
Registered: Sep 2004
Posts: 23

Original Poster
Rep: Reputation: 15
I forget to write! I run tcpdump on the server side, the connection request packages are recevied. But the server does not respond!

The sshd daemon is running.
 
Old 05-29-2006, 03:03 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok, show us your sshd_config then and the output of "ps axw | grep sshd"
 
Old 05-29-2006, 03:16 AM   #6
mkirc
Member
 
Registered: Apr 2006
Location: Vienna-Austria
Distribution: Suse 10.x, Fedora, DSL
Posts: 63

Rep: Reputation: 15
ssh releases identical

Hi,
I had the same problem, and it turned out, that Suse 10.0 and Suse 9.x have different ssh implementations.

It works with a special option, telling ssh to move to the older protocol release:

try ssh -1 <hostname>, this forces ssh to switch to version 1 of ssh-protocol !

This recommendation will only help if you have to different Linux-releases installed on cour computers !

Cheers,
Michael
 
Old 05-29-2006, 03:17 AM   #7
fnoyan
LQ Newbie
 
Registered: Sep 2004
Posts: 23

Original Poster
Rep: Reputation: 15
the output of ps
Code:
 6156 ?   Ss   0:00   /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
and the sshd_config file the only lines that are uncommented are
Code:
PasswordAuthentication no
usePAM yes
X11Forwarding yes
Subsystem   sftp   /usr/lib/ssh/sftp-server
AcceptEnv  LANG LC_CTYPE LC_NUMERIC LC_TIME LC_LOCATE LC_MONETARY LC_MESSAGES
AcceptEnv  LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv  LC_IDENTIFICATION LC_ALL
 
Old 05-29-2006, 03:25 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmm, ok. well other than suggesting turning passwordauthentication on and maybe explicitly forcing protocol 2 (although i assume default is 2 then 1 anyway), if you really think that it's not responding, paste the serverside tcpdump info from "tcpdump port 22 -nv" during a login attempt on the client.
 
Old 05-29-2006, 03:55 AM   #9
fnoyan
LQ Newbie
 
Registered: Sep 2004
Posts: 23

Original Poster
Rep: Reputation: 15
mkirc - thanks for advice but it did not work. I am also using SuSE (I don't like it :P, Slackware is my favorite, I use it because I hate to now!)

192.168.5.1 is the server and 192.168.5.23 is the client

Here is the output op tcpdump
Code:
10:34:42.593927 IP (tos 0x0, ttl  64, id 11375, offset 0, flags [DF], proto: TCP (6), length: 60) 192.168.5.23.8610 > 192.168.5.1.22: S, cksum 0xa854 (correct), 773442803:773442803(0) win 5840 <mss 1460,sackOK,timestamp 1499292 0,nop,wscale 2>
10:34:45.590608 IP (tos 0x0, ttl  64, id 11377, offset 0, flags [DF], proto: TCP (6), length: 60) 192.168.5.23.8610 > 192.168.5.1.22: S, cksum 0xa566 (correct), 773442803:773442803(0) win 5840 <mss 1460,sackOK,timestamp 1500042 0,nop,wscale 2>
10:34:51.590597 IP (tos 0x0, ttl  64, id 11379, offset 0, flags [DF], proto: TCP (6), length: 60) 192.168.5.23.8610 > 192.168.5.1.22: S, cksum 0x9f8a (correct), 773442803:773442803(0) win 5840 <mss 1460,sackOK,timestamp 1501542 0,nop,wscale 2>
10:35:03.590607 IP (tos 0x0, ttl  64, id 11381, offset 0, flags [DF], proto: TCP (6), length: 60) 192.168.5.23.8610 > 192.168.5.1.22: S, cksum 0x93d2 (correct), 773442803:773442803(0) win 5840 <mss 1460,sackOK,timestamp 1504542 0,nop,wscale 2>
output of iptables -L on server
Code:
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Last edited by fnoyan; 05-29-2006 at 03:56 AM.
 
Old 05-29-2006, 04:50 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok.... can you ssh to it from the server itself? using the 192.168.5.1 address? certainly doesn't show sshd responding to anything at all. do you have any other services on the box? maybe you could quickly install proftp or something, just to show the box as a whole accepts connections and it's definitly sshd's fault. i assume that nmap doesn't show the port as open.
 
Old 05-29-2006, 08:09 AM   #11
fnoyan
LQ Newbie
 
Registered: Sep 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for all the replies...

In one way I was able to solve the problem! I have been working on it since morning and tried lots of things! Now it is working, it is better not to touch the system

I have a new problem now...But anyway, i will have a break for networking now, have to focus on something else...
 
Old 05-29-2006, 08:11 AM   #12
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
What's the output of "ssh -v user@server" ?

<= Sorry, just saw your last post saying you solved the problem after I posted....

Last edited by zeitounator; 05-29-2006 at 08:12 AM.
 
Old 05-29-2006, 08:20 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by fnoyan
Thanks for all the replies...

In one way I was able to solve the problem! I have been working on it since morning and tried lots of things! Now it is working, it is better not to touch the system

I have a new problem now...But anyway, i will have a break for networking now, have to focus on something else...
Well, what was it???
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
SSH problem - ssh-add not respond FerkoPica Linux - Security 6 05-07-2006 03:47 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration