这是有效的 /usr/bin/sftp 调用吗?
I found this call in an app I started managing some time ago:
/usr/bin/sftp -b - -o Port=22 [email protected]
Whats suspicious is -b - -o ... isnt it? I think the param is missing here...
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为这有什么可疑之处。
-b -
只是从标准输入读取脚本,我们无法从您的示例中判断它来自哪里。它可能会被重定向或者可能只是与用户交互。-
文件名在表示标准输入时非常普遍。例如,在 Linux 下尝试cat -
。sftp
联机帮助页清楚地说明了这一点:-o Port=22
只是将 SSH 选项设置为使用端口 22(通常是默认端口)反正)。I don't believe there's anything suspicious about it.
The
-b -
is simply reading the script from standard input which we can't tell from your sample where it's coming from. It may be redirected or it may just interact with the user. The-
file name is quite prevalent at meaning standard input. Trycat -
under Linux for example.The
sftp
manpage states this clearly:The
-o Port=22
is simply setting the SSH option to use port 22 (which is usually the default anyway).