Tuesday, February 4, 2014

Remote shell access

This example explains how to use the back channel scheme to remotely access another linux shell and thus fix a problem on the remote user's system. An Admin person will help a user person by getting access to the user's linux shell like so:
If user has nc (netcat):
On the Admin's linux have a terminal window listen on port 80 (or some other):

admin:~# nc -l -n -v -p 80

and on the User's linux connect to the admin's netcat like so:

user:~# nc -e /bin/sh admin_linux_IP 80

If user does not have netcat but has telnet:
On the Admin's linux setup 2 terminal windows listening on two ports like this:

admin:~1# nc -l -n -v -p 80
admin:~2# nc -l -n -v -p 25

and on the user's linux shell initiate the connection:

/bin/telnet admin_linux_IP 80 | /bin/sh | /bin/telnet admin_linux_IP 25

No comments:

Post a Comment