簡體   English   中英

獲取paramiko.ssh_exception.SSHException:讀取SSH協議標題到期連接時出錯(Python)

[英]Get paramiko.ssh_exception.SSHException: Error reading SSH protocol banner due connection (Python)

Python 3.7 Fabric 2.4.0無法使用端口3389(如mstsc)連接遠程PC,如果我正在嘗試另一個端口 - 獲取“無法連接到端口”

v = Connection(host=ServName, port=Port, user=User, connect_kwargs={'password': 's3cr3t'})
print(v.is_connected) #get False
v.run('dir') #get error (see img attach below)

錯誤的圖像

端口3389通常用於Windows RDP而不用於ssh。 您可能嘗試通過WinRM(通常是端口5985-86)進行連接,在這種情況下使用pywinrm庫而不是結構。 你最好使用已經連接了這種連接的ansible。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM