Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-19-2008, 10:09 PM   #1
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, 10:11 PM   #2
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, 10:22 PM   #3
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 --
Old 10-19-2008, 10:33 PM   #4
Registered: Jun 2008
Location: Jakarta
Distribution: CentOS 5
Posts: 89

Rep: Reputation: 17
use -NF option
Old 10-20-2008, 11:47 AM   #5
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 11:48 AM.
Old 10-20-2008, 12:44 PM   #6
john test
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,
$ > Results.txt &
Good Luck with your project


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

All times are GMT -5. The time now is 09:50 AM.

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