debugging a hang ssh session

debugging a hang ssh session

Post by wong_po.. » Fri, 22 Feb 2008 01:03:47



I had connected to a server via ssh.  After issuing some networking
commands to configure the server, suddenly the ssh session "hang".
i.e. the screen just freezes and I get no prompt.
At this time, I can still configure the server through the serial
port.
How to debug what is wrong?
 
 
 

debugging a hang ssh session

Post by Dave Uhrin » Fri, 22 Feb 2008 01:26:17



> I had connected to a server via ssh.  After issuing some networking
> commands to configure the server, suddenly the ssh session "hang". i.e.
> the screen just freezes and I get no prompt.

There is no debugging to do.  You connected to xxx.xx.xx.xx and changed
the address to xxx.xx.xx.xy.  Your original connection is gone,
disappeared forever.

 
 
 

debugging a hang ssh session

Post by wong_po.. » Fri, 22 Feb 2008 06:07:02




> > I had connected to a server via ssh.  After issuing some networking
> > commands to configure the server, suddenly the ssh session "hang". i.e.
> > the screen just freezes and I get no prompt.

> There is no debugging to do.  You connected to xxx.xx.xx.xx and changed
> the address to xxx.xx.xx.xy.  Your original connection is gone,
> disappeared forever.

I have to use the serial port to continue my configuration. i.e.
ifdown eth0
ifup eth0
pkill -9 sshd

Is there a way to do all this using ssh?   I want to avoid using the
serial port if possible.

 
 
 

debugging a hang ssh session

Post by Dave Uhrin » Fri, 22 Feb 2008 07:33:05





>> > I had connected to a server via ssh.  After issuing some networking
>> > commands to configure the server, suddenly the ssh session "hang". i.e.
>> > the screen just freezes and I get no prompt.

>> There is no debugging to do.  You connected to xxx.xx.xx.xx and changed
>> the address to xxx.xx.xx.xy.  Your original connection is gone,
>> disappeared forever.

> I have to use the serial port to continue my configuration. i.e.
> ifdown eth0
> ifup eth0
> pkill -9 sshd

> Is there a way to do all this using ssh?   I want to avoid using the
> serial port if possible.

You already have the interface configured to the new IP address.  Did you
try to establish a new SSH session going to that address?

And what's wrong with using the serial port anyway?  I have a serial port
session going right now on a headless machine here.

 
 
 

debugging a hang ssh session

Post by goarill » Fri, 22 Feb 2008 20:32:10




> And what's wrong with using the serial port anyway?  I have a serial port
> session going right now on a headless machine here.

it's slow, but i think you can do this
if you first create a script

#! /bin/sh
ifdown eth0
ifup eth0
killall -9 sshd
/etc/rc.../sshd start

then execute it in the background (with &)

 
 
 

debugging a hang ssh session

Post by wong_po.. » Fri, 22 Feb 2008 23:32:29






> >> > I had connected to a server via ssh.  After issuing some networking
> >> > commands to configure the server, suddenly the ssh session "hang". i.e.
> >> > the screen just freezes and I get no prompt.

> >> There is no debugging to do.  You connected to xxx.xx.xx.xx and changed
> >> the address to xxx.xx.xx.xy.  Your original connection is gone,
> >> disappeared forever.

> > I have to use the serial port to continue my configuration. i.e.
> > ifdown eth0
> > ifup eth0
> > pkill -9 sshd

> > Is there a way to do all this using ssh?   I want to avoid using the
> > serial port if possible.

> You already have the interface configured to the new IP address.  Did you
> try to establish a new SSH session going to that address?

> And what's wrong with using the serial port anyway?  I have a serial port
> session going right now on a headless machine here.

My serial port setting is not right so that using vi to edit a file
does not display the file properly.
I have to use <ctrl><F> and <ctrl><B> to refresh the screen to display
the file properly.
How to setup my serial port properly?
 
 
 

debugging a hang ssh session

Post by wong_po.. » Fri, 22 Feb 2008 23:46:51







> > >> > I had connected to a server via ssh.  After issuing some networking
> > >> > commands to configure the server, suddenly the ssh session "hang". i.e.
> > >> > the screen just freezes and I get no prompt.

> > >> There is no debugging to do.  You connected to xxx.xx.xx.xx and changed
> > >> the address to xxx.xx.xx.xy.  Your original connection is gone,
> > >> disappeared forever.

> > > I have to use the serial port to continue my configuration. i.e.
> > > ifdown eth0
> > > ifup eth0
> > > pkill -9 sshd

> > > Is there a way to do all this using ssh?   I want to avoid using the
> > > serial port if possible.

> > You already have the interface configured to the new IP address.  Did you
> > try to establish a new SSH session going to that address?

> > And what's wrong with using the serial port anyway?  I have a serial port
> > session going right now on a headless machine here.

> My serial port setting is not right so that using vi to edit a file
> does not display the file properly.
> I have to use <ctrl><F> and <ctrl><B> to refresh the screen to display
> the file properly.
> How to setup my serial port properly?

I use HyperTerminal on windows 2000 to connect to my serial port.
 
 
 

debugging a hang ssh session

Post by Dave Uhrin » Sat, 23 Feb 2008 00:54:56



> I use HyperTerminal on windows 2000 to connect to my serial port.

There are far better choices of terminal emulator available.  That one you
use is just like the rest of Windows software - shit.  In the distant past
I used this one:

http://hp.vector.co.jp/authors/VA002416/teraterm.html

Since vi is sensitive to the type of terminal emulated, try to find the
one which works best for you, most likely VT102.  Then in your shell
session:

# export TERM=vt102

 
 
 

debugging a hang ssh session

Post by wong_po.. » Sat, 23 Feb 2008 03:38:50




> > I use HyperTerminal on windows 2000 to connect to my serial port.

> There are far better choices of terminal emulator available.  That one you
> use is just like the rest of Windows software - shit.  In the distant past
> I used this one:

> http://hp.vector.co.jp/authors/VA002416/teraterm.html

> Since vi is sensitive to the type of terminal emulated, try to find the
> one which works best for you, most likely VT102.  Then in your shell
> session:

> # export TERM=vt102

A newer version is at:
http://ttssh2.sourceforge.jp/
 
 
 

debugging a hang ssh session

Post by Dave Uhrin » Sat, 23 Feb 2008 03:45:24




>> http://www.veryComputer.com/
> A newer version is at:
> http://www.veryComputer.com/

I won't have a bit of use for it.  The only thing I have from Microsoft is
a one line shell script in Solaris which has more copyright *from them
than substance.
 
 
 

1. starting ssh-agent as parent of X session for SSH

I have SSH up and running on some systems, but I would like to
have ssh-agent run as the parent of X, so that ssh-agent can
handle the user's keys.

When a machine is set up for console login, I can get everything running
by entering at the console:

$ ssh-agent startx

and then in a shell window under X:

$ ssh-add

Thereafter, ssh-agent handles the user's keys, and all is copacetic.

However, I do not see a way to get this all going when the machine is
set up for graphical login (i.e. X starts right after the machine
boots). How is this normally done?  Do I need to edit the startx
script?

--
P. Douglas Reeder      Lecturer, Computer. Science. Dept., Ohio State Univ..


R>+ tv+ b+++>$ DI+ D- G e+++ h r+>+++ y+>++

2. wu-ftpd authentication problem

3. Debugging a Chat session

4. Cannot mail anything @freebsd.org anymore, help please!

5. How to tap into an NNTP session for debugging?

6. rsh sources .login, why ?

7. can ssh-agent work between ssh-2.3 and ssh-3.5

8. is gtk capable of printing multi-byte characters?

9. glink.s message interrupts debug session

10. SSH - can't connect. (debug info incl.)

11. Sun's SSH debug error

12. Remote KDE Session through SSH

13. X-Windows/XDM Session through ssh?