Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Im logged in computer A and telnet from A to B, how can I execute a command like ifconfig in computer B and save the output of that command in a file in computer A? is there any way to do that? without ftping of telneting back to computer A?
Maybe that's because your debian is messed up?
You need sh-utils. Try apt-get it or install it from source plz.
edit : after checking, the debian package is named coreutils
#apt-get install coreutils
or...
1. startx on A.
2. Open a terminal window on A (vi file to hold ifconfig info)
3. Open another terminal window on A and Telnet or ssh to B
4. do your ifconfig
5. cut and paste it into the vi file from step two.
Cs-cam: As Isuck said on a different thread ([s]he cross-posted this question , e.g., to http://www.linuxquestions.org/questi...php?p=2390748), the other computer is a router of som kind (busybox) and doesn't run an sshd.
Regarding Isuck's refusal of Agrouf's suggestion: You need tee on your local machine NOT on the router. And you should have it; IMO it's a basic UNIX command.
Isuck: Turn to the US government, National Institute of Standards. Seriously, http://expect.nist.gov/ sounds just like what you were looking for:
Quote:
Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial
Run
Code:
autoexpect telnet 192.168.10.1
once, and it will write a script for you. If necessary, you can edit it.
BTW, I think that was an accidental smilie in your 2:02 post today. You can disable them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.