LinuxQuestions.org
Review your favorite Linux distribution.
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


Closed Thread
  Search this Thread
Old 08-22-2006, 02:54 PM   #1
isuck@linux
Member
 
Registered: Jun 2006
Distribution: messed up debian
Posts: 250

Rep: Reputation: 30
warning:: this may be an stupid question!


Can I execute a command in another computer but somehow save the output in my computer? I would like to execute ifconfig in another computer but keep the output in my machine (im telneting into the other pc) without having to copy to a file and ftp it. thanks
 
Old 08-22-2006, 03:12 PM   #2
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
In general, I'd use ssh (secure shell) instead of telnet. As redirection happens in your local shell, you can do

ssh other_computer ifconfig ... > ifconfig.out

(The "..." stands for any options you want to pass to ifconfig.)

I don't know your exact circumstances, and if you're forced to use telnet, I don't know of such an elegant solution. You could start script before telnet, and when you exit from both, you'll have a transcript of the whole session in file "typescript".

Regarding your subject, I just came across How to Ask Questions the Smart Way -- great reading!
 
Old 08-22-2006, 03:13 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
In the remote computer, you would have to redirect the output to (something)--eg the port that it uses to talk to you when you are doing telnet.
In other words, when you are lookin at a terminal window, you are seeing the result of the other computer redirecting its stdout to your terminal. Obviously, you could just cut and paste, but you need something with a bit more class...
Possible--yes, but I dont know the details....
 
Old 08-22-2006, 03:44 PM   #4
isuck@linux
Member
 
Registered: Jun 2006
Distribution: messed up debian
Posts: 250

Original Poster
Rep: Reputation: 30
I am forced to use telnet because is a busybox distro with no ssh installed. This is a router, Im trying to read the ip address of the router to see if i need to update my dns when the isp changes my ip.

Ok, this didn't work ssh other_computer ifconfig ... > ifconfig.out cause the router is using some kind of script for the login that doesn't allow me to get in with the user directly.
 
Old 08-22-2006, 04:26 PM   #5
isuck@linux
Member
 
Registered: Jun 2006
Distribution: messed up debian
Posts: 250

Original Poster
Rep: Reputation: 30
So, how can I do to write a script to and redirect the output the a file

I need to telnet
when the other computer ask for user send the user
the same with the password
finally send ifconfig ppp0
and get out

I dont know how to tell the script to wait for the other computer to ask for the username pass etc.
 
Old 08-22-2006, 09:50 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

FUPS to the original

http://www.linuxquestions.org/questi...d.php?t=476217
 
  


Closed Thread


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
Stupid, stupid question; I lost Klaptop. :( Surfrider Slackware 2 08-31-2005 10:12 PM
Stupid Dumb Stupid Question... drigz Linux - Software 3 09-23-2004 04:09 PM
Stupid question.... PenguinPwrdBox Linux - Networking 1 09-16-2004 05:54 AM
stupid question amadkow General 6 05-28-2004 08:11 PM
stupid question citrus Linux - Networking 1 03-17-2004 10:46 AM


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