Review your favorite Linux distribution.
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 11-03-2003, 03:30 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 9

Rep: Reputation: 0
Smile SSH Script

Hi All,

I'm running RH9, and I would like to create a script that open ssh connection to a remote machine, every 10 min, then type a command and save the output of that command on a local file (add a new line on the same file) and then to close the connection.

Is this doable ?
How ?
Old 11-03-2003, 07:45 AM   #2
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
After a quick look at "ssh -h" and "man ssh" I think you can use "ssh -s" to execute a command remotely.

You could use some public-key authorization system to authorize the client.

And perhaps, "ssh -s ... 2>&1 >some-file.txt" works very well to store the output


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
ssh changes the way python script behaves shanenin Programming 4 11-16-2005 03:22 PM
Problems using ssh in script winwin Programming 2 05-25-2004 07:29 AM
SSH in a CGI script michedlp Programming 7 04-16-2004 10:58 AM
sh script in 'keychain' ssh program pcwulf Linux - Software 0 11-27-2003 08:16 PM
Script for SSH login CyberEE Linux - Networking 10 06-03-2002 08:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:44 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