Archived

This topic is now archived and is closed to further replies.

eedok

downloading from other computer..

Recommended Posts

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?)

Share this post


Link to post
Share on other sites
scp user@host:/path/to/file /dir/to/place/it/

Works in the opposite direction to. It will ask you for a password.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
>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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Get GNU Screen

$ 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]

Share this post


Link to post
Share on other sites
If you haven''t got screen installed, then
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.

Share this post


Link to post
Share on other sites