LinuxQuestions.org
Visit Jeremy's Blog.
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 11-03-2003, 04:30 AM   #1
incanus_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, 08:45 AM   #2
yapp
Member
 
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
 
  


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


All times are GMT -5. The time now is 12:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration