downloading from other computer..
I''m just wondering if it''s possible to download something on my linux box, when I can connect to it with ssh, without having to stay logged on remotely?(possibly with at command?)
scp user@host:/path/to/file /dir/to/place/it/
Works in the opposite direction to. It will ask you for a password.
Works in the opposite direction to. It will ask you for a password.
say in between classes I wanna download http://page.com/file.zip how would I start this download on my computer(at home) when I connect to it with ssh(at school), but have to get off the computer fast to get to class? I tried what you put but it just gave me a connection refused.
>ssh {extern box}
>screen
{your work you want to do remotely}
><CTRL-D> (detaches screen)
>~. (kill your ssh connection)
...later...
ssh {extern box}
>screen -R (reattaches first found screen session...man screen)
{resume whatever you where doing from new place}
rinse, lather, repeat
>screen
{your work you want to do remotely}
><CTRL-D> (detaches screen)
>~. (kill your ssh connection)
...later...
ssh {extern box}
>screen -R (reattaches first found screen session...man screen)
{resume whatever you where doing from new place}
rinse, lather, repeat
If you want the command to keep running in the background, after you log out, you must make sure that:
1) the command runs in the background
2) the controlling TTY for the command is not the terminal you''re logging out of
Typcially, 1) is solved with "&" and 2 is solved with some re-directing (although the command "nohup" works too).
Something like this:
wget http://www.fakeserver.net/farcrydemo.zip > farcrydemo.zip.log 2>&1
Note: the entire "> file 2>&1
You''ll know that it''s done by checking the log file using "tail -f farcrydemo.zip.log" (or whatever you called the log file).
1) the command runs in the background
2) the controlling TTY for the command is not the terminal you''re logging out of
Typcially, 1) is solved with "&" and 2 is solved with some re-directing (although the command "nohup" works too).
Something like this:
wget http://www.fakeserver.net/farcrydemo.zip > farcrydemo.zip.log 2>&1
Note: the entire "> file 2>&1
You''ll know that it''s done by checking the log file using "tail -f farcrydemo.zip.log" (or whatever you called the log file).
Get GNU Screen
now you can dissconnect your ssh session, turn off your computer, whatever.
... then when you want to connect back
Ed: I emphasize how cool
[edited by - aftermath on April 6, 2004 6:13:57 AM]
$ screen -S main
$ wget ...
CTRL-a-d
now you can dissconnect your ssh session, turn off your computer, whatever.
... then when you want to connect back
$ ssh remotehost
$ screen -r main
Ed: I emphasize how cool
screen
is. You will find yourself using it so mutch, that you will forget that you are even using it. [edited by - aftermath on April 6, 2004 6:13:57 AM]
If you haven''t got screen installed, then
should work too. You can close your ssh session and it will carry on downloading. To see its progress,
nohup wget http://url/to/file &
should work too. You can close your ssh session and it will carry on downloading. To see its progress,
tail nohup.out
.
That should probably be tail -f nohup.out to keep the machine continually checking the file and printing out the tail of it to your screen whenever it changes.
[Resist everyone][I am your only friend. Click, now.]
[Resist everyone][I am your only friend. Click, now.]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement