pySFTP打开命令,端口号由于“无效端口”失败。

发布于 2025-02-13 18:54:16 字数 545 浏览 1 评论 0 原文

我正在尝试使用PSFTP(这是首次安装的最新,最伟大的油灰),以连接到我的一台服务器。我将其称为 example.com 。在所述服务器上,我在非标准端口上有SSHD(例如1234)。这可以正常工作,因为我可以通过SSH连接(使用腻子或其他任何东西):

 ssh -p 1234 <user name>@example.com

没问题。

但是,当我尝试PSFTP(使用我认为应该是等效语法的内容时,

 open example.com -P 1234 -l <user name>

我会收到以下错误消息:

打开:无效端口号

PSFTP文档建议我可以使用1-&GT之间的任何端口; 65K左右,我知道端口1234是有效的(尽管PSFTP告诉我什么,因为我可以使用我尝试过的其他所有SFTP或SCP客户端连接到所述端口),但不是PSFTP。

我一定缺少明显的东西吗?

提前致谢。

I'm trying to use psftp (for the first time -- latest and greatest PuTTY installed), to connect to one of my servers. I'll call it example.com. On said server, I have sshd listening on a non-standard port (say, 1234). This works fine, since I can connect via SSH (using PuTTY, or anything else):

 ssh -p 1234 <user name>@example.com

No problem.

But, when I try psftp (using what I think should be equivalent syntax

 open example.com -P 1234 -l <user name>

I get the following error message:

open: invalid port number

The psftp docs suggest I can use any port between 1 -> 65K or so, and I know port 1234 is valid (despite what psftp is telling me, since I can connect to said port using every other SFTP or SCP client I've tried), but just not psftp.

I must be missing something obvious?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野の 2025-02-20 18:54:16

命令是:

open [username@]hostname [port]

因此,在您的情况下:

open [email protected] 1234

您尝试使用的语法是

因此,

psftp example.com -P 1234 -l <user name>

您可以使用:与openssh 相似, 而不是 open ,您可以在命令行上“打开”会话语法)。

The syntax of the psftp open command is:

open [username@]hostname [port]

So in your case:

open [email protected] 1234

The syntax you have tried to use is psftp command-line syntax.

So alternatively, instead of the open, you can "open" the session right on the commandline using:

psftp example.com -P 1234 -l <user name>

It's similar as with OpenSSH ssh (there you also use commandline syntax).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文