change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the sshsession hang - SSH

This is a discussion on change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the sshsession hang - SSH ; I had connected to a server via ssh. After issuing some networking commands to change the eth0 IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the ssh session "hang". i.e. the screen just freezes and I get no prompt. I have to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the sshsession hang

  1. change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the sshsession hang

    I had connected to a server via ssh. After issuing some networking
    commands to change the eth0 IP addresses from xxx.xx.xx.xx to
    xxx.xx.xx.yz, the ssh session "hang". i.e. the screen just freezes and
    I get no prompt.
    I have to use the serial port to continue my configuration. i.e.
    ifdown eth0
    ifup eth0

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

  2. Re: change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the ssh session hang

    On 2008-02-20, wong_powah@yahoo.ca wrote:
    > I had connected to a server via ssh. After issuing some networking
    > commands to change the eth0 IP addresses from xxx.xx.xx.xx to
    > xxx.xx.xx.yz, the ssh session "hang". i.e. the screen just freezes and
    > I get no prompt.


    Well, yeah. You have a connection to IP address xxx.xx.xx.xx. When
    you change the IP address to xxx.xx.xx.yz, you don't have a connection
    to the new IP address, you still have a connection to xxx.xx.xx.xx--
    which isn't a connection that has anything on the other end any more.
    Hence, the freeze.

    > I have to use the serial port to continue my configuration. i.e.
    > ifdown eth0
    > ifup eth0
    >
    > Is there a way to do all this using ssh? I want to avoid using the
    > serial port if possible.


    Assuming you can't get a new connection via ssh until you bounce the
    eth0 connection, you could schedule the whole thing via crontab
    or at and then reconnect once it finishes. You'd still want the
    serial as backup in case you don't pull it off. The basic fact here
    is that you're doing basic reconfiguration of your networking; while
    it's happening, you can't expect to have have any network connectivity.


    --
    Christopher Mattern

    NOTICE
    Thank you for noticing this new notice
    Your noticing it has been noted
    And will be reported to the authorities

  3. Re: change IP addresses from xxx.xx.xx.xx to xxx.xx.xx.yz, the sshsession hang

    Chris Mattern wrote:
    > On 2008-02-20, wong_powah@yahoo.ca wrote:


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

    >
    > Assuming you can't get a new connection via ssh until you bounce the
    > eth0 connection, you could schedule the whole thing via crontab
    > or at and then reconnect once it finishes. [..]


    Or put the commands (or script) in the background so it can't freeze
    with your tty. If you're sure the command(s) are fine, all should be
    well and you should be able to connect to the new IP.

    > [..] You'd still want the
    > serial as backup in case you don't pull it off.


    I usually issue such a command or script from a screen session, if
    something fails, you can at least connect via de serial line to the
    console and reload your screen session, so you can see what errors it
    gave. This could also be done with logfiles, it's just my prefered way ..

    --
    Regards,
    Harrie

+ Reply to Thread