LinuxQuestions.org
Review your favorite Linux distribution.
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 08-30-2004, 11:01 PM   #1
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Rep: Reputation: 0
SSH client seems to simply hang


Ok, when I execute ssh addressto.mysite.com, nothing happens. The cursor just sits at the beginning of the next line. Running netstat shows that there is an established connection to the server at port ssh, but nothing seems to happen. I'm running a new install of Mandrake 10. To answer the obvious question, yes sshd is running on the server, and I can connect just fine under windows. SSH under linux has never worked, although never might not be the right word with a 8 hour old install. Thanks in advance!
 
Old 08-30-2004, 11:19 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
do you have any iptables rules running on the mandrake box?
 
Old 08-30-2004, 11:28 PM   #3
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
No iptables

Running iptables returns command not found, so I would say no, there are no rules preventing it. I stuck with the default security settings in the mandrake installer, if that answers any questions.
 
Old 08-31-2004, 12:06 AM   #4
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
not sure of mandrake's default security setup, but it's the first thing i would check just in case ssh is blocked as an output.

btw, you have to be root to run the command:

# iptables -L
 
Old 08-31-2004, 12:16 AM   #5
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Connection status

Yeah, I realized that the normal users get command not found on many things, iwconfig, ifconfig, iptables to name three. I was going to say that netstat shows the connection as established, but that's not true. I misread it before, the connection state is SYN_SENT. I'm not sure what that means, but I'm hoping it's a big red flag for someone.
 
Old 08-31-2004, 12:27 AM   #6
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
hmm, it still kind of seems like a firewall problem. afaik, syn_sent means it tried to connect, and if you're not getting a response it would seem you're blocked somewhere. did you try to connect using just the IP instead of the name?

it might help if you could provide more details about your network. what are you connecting to? a webserver? a local domain? is the windows machine on the same network? are you behind a router firewall? etc.
 
Old 08-31-2004, 12:28 PM   #7
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Network

Network setup as far as I can give you is a Dual XP/Mandrake machine connected wirelessly to a linksys WRT54G router/switch/AP, and then after that, it's into the school's network. I am however able to connect with ssh on XP, so that seems to tell me that the network is fine.
 
Old 08-31-2004, 12:53 PM   #8
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
that tells you the network is fine in windows, but not necessarily in mandrake. do you have other network capability in linux: web, ping, ftp, etc.? iow, it's not your wireless connection itself that's down, is it?
 
Old 08-31-2004, 02:39 PM   #9
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Network Status

Yeah, I'm actually on Mandrake right now, on wireless. I've got ping, web, ftp, full d/l speed, everything looks good, except ssh.
<edit>
Forgot to answer part of a previous post. I'm connecting to a linux server running behind a linksys router on a cable connection back home. That machine runs debian woody. I did try just the IP, no change. The windows machine is the same machine as the Mandrake machine
</edit>

Last edited by jmielens; 08-31-2004 at 02:43 PM.
 
Old 08-31-2004, 03:00 PM   #10
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
could it be that mandrake is still running ipchains?? well you could check that instead of iptables (as root):

# ipchains -L

since you can connect from the very same box running windows, i can't think of anything else it would be except the output policy on mandrake. you might check the /etc/hosts.allow and hosts.deny on the debian server, although again if you can connect with the same IP and name from windows, i don't know how that would be blocking you. just to be sure, you might want to add the IP to hosts.allow and comment out anything in hosts.deny that might be causing mandrake to be blocked.

sorry, maybe someone who knows mandrake better will chime in. gl.
 
Old 08-31-2004, 03:50 PM   #11
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
ichains

it seems that ipchains isn't installed either. That in itself wouldn't cause this problem, would it? Just to ensure it's not the server, i added ALL: ALL to hosts.allow, and there was nothing in hosts.deny. Not sure if it was just last night, or what, but now when I try ssh, netstat shows the connection as established. Just to make sure, the correct way to connect is simple execute ssh addressof.mysite.com , right?
 
Old 08-31-2004, 04:04 PM   #12
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Re: ichains

Quote:
Originally posted by jmielens
it seems that ipchains isn't installed either. That in itself wouldn't cause this problem, would it? Just to ensure it's not the server, i added ALL: ALL to hosts.allow, and there was nothing in hosts.deny. Not sure if it was just last night, or what, but now when I try ssh, netstat shows the connection as established. Just to make sure, the correct way to connect is simple execute ssh addressof.mysite.com , right?
ipchains/tables could be blocking it if there was a block on that port or service on the output. for example, i just loaded that as a block, and it would look something like this:
Code:
[8] root:/home/sero # iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DROP       tcp  --  anywhere             anywhere            tcp dpt:telnet
you can see that telnet (or ssh, i.e, port 23) is blocked over tcp (DROP), so i wouldn't be able to ssh out on that machine.

i take it you're not using a non-standard port on the server that you're entering in windows but forgot to add in linux, are you? (e.g., ssh addressof.mysite.com -p 555)?

you can connect with just ssh addressof.mysite.com, but if it's a different username it's probably better to add that in the command: ssh -l username addressof.mysite.com.

what do you mean by the connection is established? sounds to me more like it's not established. what netstat command are you running?

Last edited by synaptical; 08-31-2004 at 04:07 PM.
 
Old 08-31-2004, 04:05 PM   #13
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Re: ichains

oops, replied instead of edited.

Last edited by synaptical; 08-31-2004 at 04:07 PM.
 
Old 08-31-2004, 04:40 PM   #14
jmielens
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Like i say, i have neither ipchains nor iptables, or at least don't have the programs. I figured out why it was at SYN_SENT, there were internet connectivity issues back home last night, so that's why it was like that. Now running netstat --tcp returns an established state of the ssh connection. No, I'm running on the standard port. ISP blocked http, but evidently decided to leave ssh open. I'm actually using the same username, but just to make it perfectly clear for the computer, i tried ssh -l username address.to.mysite -p 22
No luck yet. Thanks for all your help though.
 
Old 08-31-2004, 04:44 PM   #15
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
maybe try port 23? what port is listed in /etc/ssh/sshd_config on the server?

Last edited by synaptical; 08-31-2004 at 04:47 PM.
 
  


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
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
Shutdown simply hang at the last step (Power off) omes Linux - General 4 01-17-2005 12:28 AM
samba client hang up Morz Slackware 2 05-03-2004 10:41 AM
ssh connection hang on SYN_RECV and FIN_WAIT1 outburst Linux - Networking 0 02-22-2004 10:38 AM
NFS Client hang squashes all disk I/O IcarusLR Linux - Networking 0 02-13-2003 12:21 PM

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

All times are GMT -5. The time now is 12:15 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