2

I am using Raspberry Pi with PiFace as automation device. I have some python scripts which control PiFace in Raspberry. I need run the scripts remotely from Windows PC and I have to use Telnet... So my question is: How can I run any python script on Linux machine remotely over telnet from windows PC. For example I need run command like "python /home/automation.py" over telnet from Windows PC.

For your understanding: I can not use SSH/putty! I need control Pi from "closed" aplication on windows server. The application can send only ascii command via Telnet. So my question is how I can translate some ASCII command to bash command...

Can you help please?

I found some similar questions but that was about reversed communication.

Thank you very much.

3

Please be aware that telnet is not considered to be secure.

You need to run a telnet server on the Raspberry Pi. The following command will install and run a telnet server.

sudo apt-get install telnetd

You can then use telnet to login to the Pi, e.g.

$ telnet dick
Trying 192.168.1.95...
Connected to dick.
Escape character is '^]'.
Raspbian GNU/Linux 8
dick login:

You will need to write a script on the Windows PC to automate the process.

  • Telnet is usually disabled on *nix systems because of the insecurities that Joan refers to (it sends even passwords unencrypted across the network) so it is best to restrict access to be from known hosts on just your LAN (check out the man-page for /etc/hosts.allow and /etc/hosts.deny) - even then that does not offer total safety... – SlySven Jan 28 '16 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.