在 nodejs 中等待握手时 ssh2 超时

sur*_*b14 5 ssh node.js

我正在尝试在我的 nodejs 应用程序中使用 ssh 上传文件,在尝试时,我收到错误消息“连接错误:等待握手时超时”。 给出了连接设置,

....
}).connect({
   host: 'hostname without http',
   port: 22,
   debug: console.log,
   readyTimeout: 99999,
   username: 'name',
   password: 'password'
 });
Run Code Online (Sandbox Code Playgroud)

如果我手动上传到服务器,它可以使用给定的主机名、用户名和密码正常工作。