LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2003, 02:12 PM   #1
joshf
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Rep: Reputation: 15
end ssh session without stopping programs


I log into my redhat server with ssh. I start an ftp session between the server a public ftp server. I start a file downloading from the public ftp server to my server. If I end the ssh session between my local computer and my server, the download from the public ftp to my server stops as well.

I would like to be able to ssh to my server, start a download, and end the ssh session without stopping the download.

How can I do this?
 
Old 07-12-2003, 02:34 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you run the transfer as a single command and put and ampersand "&" at the end it should stay running.
 
Old 07-12-2003, 02:43 PM   #3
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Rep: Reputation: 15
You can also use nohup for such things.
I think it is much more reliable...
thats what I think..a
Vijayant
 
Old 07-12-2003, 02:54 PM   #4
joshf
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks!!! That is what I was looking for!
 
Old 07-12-2003, 03:12 PM   #5
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Rep: Reputation: 15
No problems josh..
Good to know that a newbie can also help another newbie.
Take care
Vijayant
 
Old 07-12-2003, 05:38 PM   #6
joshf
LQ Newbie
 
Registered: Jul 2003
Posts: 21

Original Poster
Rep: Reputation: 15
Another question about nohup:

I gave the command:
nohup ftp

Then, I opened another ssh session to view nohup.out as I connected and choose files to download.

That did work, but is there a way to have the output displayed to the screen instead of the file? That would be easier than opening nohup.out after each command I type.
 
Old 07-12-2003, 06:28 PM   #7
vijlovely
LQ Newbie
 
Registered: Oct 2002
Posts: 25

Rep: Reputation: 15
Quote:
Originally posted by joshf
Another question about nohup:

I gave the command:
nohup ftp

Then, I opened another ssh session to view nohup.out as I connected and choose files to download.

That did work, but is there a way to have the output displayed to the screen instead of the file? That would be easier than opening nohup.out after each command I type.
I can tell you an easier way to get all this done provided u know what you have to do after doing an ftp
Step 1
create a .netrc file with the following text (all in one line)

machine <name of the ftp server/machine> login <login> password <password>

save this file.. make sure u have the file named .netrc

now write the command :
chmod 700 .netrc

ok..
now open a new text file (lets call it input.txt) and write all the ftp commands in this file ... e.g.

bin
cd test1
mget dummy.zip
bye

and now u can straightaway write the command
nohup ftp <name of the ftp server> < input.txt


Check this out and do let me know if it solves ur problem..
Cheers
Vijayant
 
Old 07-13-2003, 08:39 AM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Why not just do it all on the cli with wget?

Using an "&" will put it on the screen.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
End Session Command bmccorm2 Fedora 1 10-16-2005 02:14 PM
stopping programs rohr Programming 2 04-19-2005 04:36 AM
Stopping programs with Kcron underberg Linux - General 2 03-06-2005 08:55 AM
PC freezes at end of CDRW burn session hwood7587 Linux - Hardware 5 08-07-2003 09:01 AM
End of session box Johng Linux - Software 2 12-22-2002 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration