Python Exscript - use 8022 instead of 22 port with ssh

523 Views Asked by At

Is there a possibility of connecting with ssh to a different port other than the standard port 22 in Python Exscript module?

If so, how can this be achieved?

Couldn't find anything relevant when browsing the documentation.

1

There are 1 best solutions below

0
On BEST ANSWER

Protocol.connect (inherited by SSH2) takes an optional port parameter:

conn = SSH2()
conn.connect(hostname, 8022)