0

I want to have a full python interactive shell over network (something like the default interpreter that come with a python install). Is there an easy way to get an interactive python shell on a remote computer using a socket ? I can't use SSH and don't care about security. Preferably, I just want to use modules that come with python by default.

Edit : I don't want that the interactive shell create a window on the client side. It should not be visible on the computer.

1
  • 2
    You should specify why you can't use SSH. Commented Apr 6, 2014 at 8:23

2 Answers 2

2

You can simply use netcat:

python | nc -l -p 9090 &

Then connect to it using telnet

telnet $HOSTNAME 9090
Sign up to request clarification or add additional context in comments.

2 Comments

The remote computer will mostly be running Windows where netcat is not available
What do you want to do?, the question is still unclear... Is this for teaching or hacking?
1

Twisted includes a Python REPL server that supports telnet access (SSH too, in case you ever manage to get an SSH client installed).

$ twistd -n  manhole --telnetPort tcp:50023
2014-04-06 11:14:01-0400 Log opened.
2014-04-06 11:14:01-0400 twistd 12.0.0 (/usr/bin/python 2.7.3) starting up.
2014-04-06 11:14:01-0400 reactor class: twisted.internet.pollreactor.PollReactor.
2014-04-06 11:14:01-0400 ServerFactory starting on 50023
2014-04-06 11:14:01-0400 Starting factory <twisted.internet.protocol.ServerFactory instance at 0x2836c20>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.