Skip to content

Instantly share code, notes, and snippets.

View grugq's full-sized avatar

thaddeus t. grugq grugq

View GitHub Profile
@grugq
grugq / sshclient.py
Created December 6, 2011 02:58
twisted ssh client (based on conch.py) with an embedded cmd.Cmd shell for controllng the SSH session
from twisted.internet import reactor, defer, endpoints, task, stdio
from twisted.conch.client import default, options, direct
from twisted.conch.error import ConchError
from twisted.conch.ssh import session, forwarding, channel
from twisted.conch.ssh import connection, common
from twisted.python import log, usage
import signal
import tty
import struct
import fcntl