Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Restoring a previous SSH session

  • 02-04-2004 11:36am
    #1
    Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭


    So I'm in work, log in to my network at home via SSH, and start an ISO download with wget. Everything's chugging along nicely, until the session disappears off my screen, and the log shows "Connection reset by peer".

    So I log in again, and verify that the download is continuing, using ps. I can even see the file size increasing by doing periodic ls -l entries. But is there any way of restoring the actual screen that I started the download on? It has the wget ASCII progress bar, and also the download speed. No problem if not, but it was handy to be able to keep an eye on progress, and also monitor speed, particularly as UTV BB has been a bit flaky recently.


Comments

  • Closed Accounts Posts: 286 ✭✭Kev


    you could start wget with "screen"


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    If you want to reconnect to a terminal in general then run it in screen on the machine you're connecting to. Just SSH in and resume the screen session.

    For wget specifically you could kill the wget process them use wget's continue option (-c if I remember correctly) to resume the download at the current position with the progress bar, etc. You won't lose any data.

    Also, If you background (-b option) wget intially then it will write it's output to a file (wget-log) in which you can see information about the download (tail it for the latest info). For a single large file the log will have regularly entries like this:
    7500K .......... .......... .......... .......... ..........  1%  666.67 KB/s
    7550K .......... .......... .......... .......... ..........  1%  925.93 KB/s
    


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    screen is your best bet for this situation and most other problems in life.
    If you leave the screen terminal at home running,
    screen -x will let you connect as a shared view.
    This means that if somebody at home was watching, they would see anything you're doing when you connect in.
    This is excellent for remote training and collaboration.
    If instead you use screen -D -RR
    it will detach your home terminal before
    it reconnects to the session.

    You could also use lftp instead of wget, as it will allow you put things in the background and continues when you exit.

    NiallB


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    Thanks folks. I haven't used screen before, but it sounds good.
    You could also use lftp instead of wget, as it will allow you put things in the background and continues when you exit.

    wget continued when I exited as well - or at least when I was kicked out.


Advertisement