Search code examples
pythonsshparamikoexscript

Python Exscript - use 8022 instead of 22 port with ssh


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.


Solution

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

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