Answer the question
In order to leave comments, you need to log in
How to remotely execute a command or script via telnet?
Hello
Please advise.
There is Ubuntu Server 14.04, from it you need to use a completely open telnet connection without a login and password to remotely execute a command and get the result of the command.
The OS to which we remotely connect via telnet and execute the command is BusyBox.
Command - nc 216.146.43.71 80 | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" works on BusyBox and returns the external IP through which BusyBox exits to the Internet.
It is necessary that this command be executed directly or through a script on Ubuntu and also return the result.
Now the command is being executed, but the result is not returned to the Ubuntu command line, although I tried to add 2>&1 at the end of the line to redirect the output on the advice from the network.
Thanks in advance for your answers!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question