Answer the question
In order to leave comments, you need to log in
Python paramiko. transport.accept not working?
Here is the code:
import paramiko
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
client.connect(
'192.168.1.129',
'22',
username='root',
key_filename=None,
look_for_keys=False,
password='1',
)
except Exception as e:
print("*** Failed to connect: ", e )
sys.exit(1)
print('connected')
transport = client.get_transport()
print(transport) #<paramiko.Transport at 0x3d9d890 (cipher aes128-ctr, 128 bits) (active; 0 open channel(s))>
chain = transport.accept(1000)
print(chain)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question