LinuxQuestions.org
Help answer threads with 0 replies.
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 10-19-2008, 09:09 PM   #1
Ricio
Member
 
Registered: Sep 2003
Location: Colombia
Distribution: Debian
Posts: 220

Rep: Reputation: 30
Exclamation SSH remote command withouth output


Hello all,

I want to run a script on a remote host with ssh, the script takes a long time, so I dont want ssh to show me the output of the command, I just want to run it, get my local prompt back, and leave it run it remotely...

How can that be done?
 
Old 10-19-2008, 09:11 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I use "at" for that, as in

at -f script.file now

Another way is

nohup command &
 
Old 10-19-2008, 09:22 PM   #3
skellam
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
You might want to consider the 'screen' command as it would suit your needs very well.

Read about it here -- http://www.linux.com/feature/113871?theme=print
 
Old 10-19-2008, 09:33 PM   #4
WorldIsNotFair
Member
 
Registered: Jun 2008
Location: Jakarta
Distribution: CentOS 5
Posts: 89

Rep: Reputation: 17
use -NF option
 
Old 10-20-2008, 10:47 AM   #5
Ricio
Member
 
Registered: Sep 2003
Location: Colombia
Distribution: Debian
Posts: 220

Original Poster
Rep: Reputation: 30
the at command works perfect for what I want to do... Thank you all...

but now I would like the script to print in the screen when everything is done... could be either the remote host or local one...

How could that be done??

Last edited by Ricio; 10-20-2008 at 10:48 AM.
 
Old 10-20-2008, 11:44 AM   #6
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Might try using the ampersand to release your SSH prompt and redirecting the output to a file on the remoete machine,
Code:
$ XYZ.sh > Results.txt &
Good Luck with your project
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
logging, remote ssh, scripts, and the at command gctaylor1 Programming 4 01-29-2007 08:22 AM
How to log command output from telnet session even after logout from the remote serve UltraSoul Solaris / OpenSolaris 2 10-15-2006 08:20 PM
SSH remote command not timing out tajsss Other *NIX 5 04-28-2005 06:57 AM
Adding users via ssh remote command enolc Linux - Software 2 05-27-2004 06:48 AM
remote command over ssh, password prompt linowes Linux - General 2 10-27-2002 08:22 PM


All times are GMT -5. The time now is 06:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration