Telnet & ssh suddenly not working...

Wolfman-K

Registered
Hi everyone. I've been a lurker here for quite a while but I finally have come up with a problem I need your help with...

I use my PowerBook G4 to access my business linux/unix/and windows systems. I'm a heavy user of the terminal windows cli for telnet (in the office) and ssh (out of the office). I also use ssh for sftp transfers constantly.

About 2 days ago all of these functions stopped... Any ideas why? And more importantly... how do I fix it?

I have tried both the terminal windowsd and third party programs like MacWise & Cyber Duck. Nothing works. I have also repaired disk permissions etc...

Please help.
 
Are you sure they have not changed any settings at work?
For instance when I tried to telnet the last time, I discovered telnetting was disabled.
 
Do you have any other systems at home that might be able to run SSH? If so, you can test there. To me, it sounds as though your workplace might be blocking some ports.
 
Well first of all I am in charge of such settings at work... ;)

Second yes I have tried... I have 2 systems at home that will take ssh and neither work from this machine but they do work form others.. same thing at work. I can ssh and telnet to and from my windows and Ubuntu systems, but not from the OS X Powerbook.... (it accepts ssh, fine)

Is it possable the wifi is messing with it?
 
Do you have the firewall enabled in OS X? If so, are you allowing SSH and the other desired ports set to pass through the firewall?

Let us know what you find.
 
Try to ssh with the -v -vv and -vvv flags. Each one raises the level of error reporting and look for why the connection is failing. I bet you can find something in there and if not post it and we can help debug it for ya.
 
nixgeek said:
Do you have the firewall enabled in OS X? If so, are you allowing SSH and the other desired ports set to pass through the firewall?

Let us know what you find.

firewall disabled... but I discovered ssh works through a cat5 physical connection... going to test that at work tomorrow with telnet...
 
lurk said:
Try to ssh with the -v -vv and -vvv flags. Each one raises the level of error reporting and look for why the connection is failing. I bet you can find something in there and if not post it and we can help debug it for ya.

thanks .. thats a good idea... I'll have more info tomorrow morning.
 
oooo kay.... Following lurks suggestion I ran an ssh attempt using the -vvv switch.

Code:
PowerbookG4kas:~ keith$ ssh -vvv keith@192.168.104.198
OpenSSH_3.8.1p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.104.198 [192.168.104.198] port 22.
debug1: Connection established.
debug1: identity file /Users/keith/.ssh/identity type -1
debug1: identity file /Users/keith/.ssh/id_rsa type -1
debug1: identity file /Users/keith/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2p1 Debian-7ubuntu1
debug1: match: OpenSSH_4.2p1 Debian-7ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug3: Trying to reverse map address 192.168.104.198.
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
Write failed: Broken pipe
PowerbookG4kas:~ keith$

It appears to me that a connection is made but I am never getting to the login portion... ideas?
 
How do I clear/whipe out the stored ssh keys...? if I can clear the keys maybe it will fix itself.

I'm running out of ideas, otherwise.

Edit:

I found the known_hosts file in ~/.ssh and cleared it... no change I still connect but fail to get a login prompt. Could it be on the host server side? Is there a file to clear there?
 
That is odd, it looks like the server is cutting you off or a firewall is blocking you mid-connection. The firewall thing can happen with stateful firewalls that are misconfigured. For instance, if the connection is punching a hole through for a short fixed period of time. I have to admit that that is a stretch here, usually I see that with multiple hour timeouts.

As for getting rid of stored keys they all live in ~/.ssh if want ot you can blow all those files away (save any id keys you may have generated.) That will let you start fresh. Also just of giggles make a totally new user, log in and try from there.
 
it is totally weird.... It seems to be only the three servers that I use on my work net. SSH and Telnet work fine on other nets. I've thought about the firewall thing, but that doesn't make sence either.. 1) I'm not going through it, these systems are all on the same subnet, so the firewall shouldn't be invoved. 2) it only affects this computer, I can ssh/telnet from other systems on the subnet just fine.

I'll try the new user thing in a bit, thanks for the tip.
 
ok... Yes, I am still working on this.... *sigh*

I realized today that this may actually not be realted to telnet and shh.... I think they are a symptom of a bigger problem. I am having troubles connecting to anything on this net. Anything off the net works fine... but anything on the net I am getting a huge delay and the connection is timing out. I can even use this net to get out to the internet without a delay but using any network resourses causes a lag. I think the telnet and ssh are just timing out due to the lag.

I ran a ping on the net... I get a ttl=64 which is good but time ranges from 1.2 to 16.8ms. Other machines on the net ping at 0.2 ms

It does this over the wireless net and hardwired. Any thoughts on this dilema??
 
ok I have a solution. I figured out that it was the a dns query that was causing the lag. so I added the nessesary IP addresses to my hosts file and bingo I'm back.

I still don't know why this changed all the sudden, and why it only effected this network, not my home or other offsites ones. Perhaps it was something with the last OSX update, not sure. But it's not as important now so, I will ponder that on a back burner....
 
I had the same problem you did and like you just started "out of the blue".
Previously tried all that you did and all that worked for me was your idea of putting the IP (of the machine I was trying to SFTP to) in the host file. Now I am "patched" and working. My only question is to why. Had 2 Mac boxes that had this problem. The Win box could get to the Mac boxes but not Mac to Mac. One was at 10.4.6 and the other was at 10.4.5, so it does not appear to be a problem with the latest OS update. No hardware or software change other than OS update on one. No clue here. If I find anything out I will post and please do the same.
 
Back
Top