How to run telnet over ssh in python

Dhruv Patel
       telnet
server ←————→ device
  ↑
  | SSH
  ↓
localhost (me)

I have a device that is connected with one server computer and I want to talk to the device by ssh'ing into the server computer and send telnet commands to my device. How do I setup things in Python to make this happen?

John Zwinck

You can use Python's paramiko package to launch a program on the server via ssh. That program would then in turn receive commands (perhaps via stdin) and return results (via stdout) from the controlling program. So basically you'll use paramiko.SSHClient to connect to the server and run a second Python program which itself uses e.g. telnetlib to talk to the device.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to run telnet over ssh in python

From Dev

How to run a python cmd inside a bash cmd over ssh

From Dev

How are terminal length and width forwarded over SSH and telnet?

From Dev

Run python script with telnet

From Dev

How to run subshell commands over SSH?

From Dev

How to run commands in batch mode over ssh?

From Dev

How can I run glances over ssh?

From Dev

piping text file to telnet over ssh

From Dev

how to check a switch or router using SSH or telnet in python

From Dev

SSH and telnet to localhost using python

From Dev

Python subprocess - run multiple shell commands over SSH

From Dev

Run python script on server over ssh session in the background persistantly

From Dev

Python subprocess - run multiple shell commands over SSH

From Dev

How to run git fetch over ssh in a windows subprocess

From Dev

How to forward X over SSH to run graphics applications remotely?

From Dev

How can I run detached command with sudo over ssh?

From Dev

How to perform a dry-run using rsync over ssh?

From Dev

MySQL - How to run long (>14 hour) job over an SSH connection?

From Dev

How to run functions and local resources over SSH in a shell script

From Dev

Does python automatically close SSH and Telnet

From Dev

How to print over ssh?

From Dev

How to read telnet sessions with python

From Dev

How to install Python packages over SSH Port Forwarding?

From Dev

Run a nohup command over SSH, then disconnect

From Dev

Detach/reattach an application run on X over SSH?

From Dev

Run a nohup command over SSH, then disconnect

From Dev

Automatically run commands over SSH on many servers

From Dev

Run htop over ssh via single command

From Dev

Log Commands Run Over SSH on Client Side

Related Related

HotTag

Archive