LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-29-2013, 10:12 AM   #1
jmanjohn61
Member
 
Registered: Dec 2003
Distribution: FC2
Posts: 38

Rep: Reputation: 15
remote login script and capture results


I am looking for a script to login to a remote system, run a command on remote system that produces screen output, capture that output and save on local machine.
 
Old 04-29-2013, 10:49 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by jmanjohn61 View Post
I am looking for a script to login to a remote system, run a command on remote system that produces screen output, capture that output and save on local machine.
Did you have a look at ssh? Something like this should work:
Code:
ssh username@some.machine command.goes.here > output.file
 
Old 05-01-2013, 06:38 AM   #3
jmanjohn61
Member
 
Registered: Dec 2003
Distribution: FC2
Posts: 38

Original Poster
Rep: Reputation: 15
From a linux box to a VxWorks box....works great !!!

Thank you!!
 
Old 05-02-2013, 09:08 AM   #4
jmanjohn61
Member
 
Registered: Dec 2003
Distribution: FC2
Posts: 38

Original Poster
Rep: Reputation: 15
Additinoally, how might I ~pipe/scp~ the results to yet another server?
 
Old 05-02-2013, 09:25 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by jmanjohn61 View Post
Additinoally, how might I ~pipe/scp~ the results to yet another server?
To scp a file to another machine:
Code:
scp output.file username@other.machine:/target/directory/output.file
Have a look here as well:
- SSH and SCP: Howto, tips & tricks
- Example syntax for Secure Copy (scp)
 
  


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
How can I create a remote login script w/ options jsullivan44 Programming 1 08-11-2010 10:40 AM
Creating a script to run netstat on remote servers and return results madpear Programming 3 10-29-2009 09:44 AM
Is It Possible to write a script which login a remote server senthilvael Linux - Newbie 4 11-21-2007 06:23 PM
shell script for remote ssh login sefaklc Programming 5 08-28-2007 09:03 PM
bash - execute commands on a remote machine capture results, etc dkrysak Programming 1 11-18-2005 01:50 PM


All times are GMT -5. The time now is 12:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration