Welcome to the most active Linux Forum on the web.
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!


Closed Thread
  Search this Thread
Old 08-22-2006, 01:54 PM   #1
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, 02:12 PM   #2
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, 02:13 PM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
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, 02:44 PM   #4
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, 03:26 PM   #5
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, 08:50 PM   #6
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
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

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 09:12 PM
Stupid Dumb Stupid Question... drigz Linux - Software 3 09-23-2004 03:09 PM
Stupid question.... PenguinPwrdBox Linux - Networking 1 09-16-2004 04:54 AM
stupid question amadkow General 6 05-28-2004 07:11 PM
stupid question citrus Linux - Networking 1 03-17-2004 09:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:52 PM.

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