我正在尝试使用 Plink 在远程服务器上运行命令。本地和远程机器都是 Windows。虽然我可以使用 Plink 连接到远程机器,但我无法使用“-m 文件”选项。我尝试了以下三种方法,但无济于事:
尝试1:
plink.exe -ssh -pw mypwd john.doe@server -m file.txt
输出:
Could not chdir to home directory /home/john.doe: No such file or directory
dir: not found
'file.txt' 只包含一个命令,即 dir
尝试2:
plink.exe -ssh -pw mypwd john.doe@server dir
输出:
Could not chdir to home directory /home/john.doe: No such file or directory
dir: not found
尝试3:
plink.exe -ssh -pw mypwd john.doe@server < file.txt
在这种情况下,我得到以下输出:
Using username "john.doe".
****USAGE WARNING****
This is a private computer system. This computer system, including all
..... including personal information, placed or sent over this system
may be monitored.
Use of this computer system, authorized or unauthorized, constitutes consent
... constitutes consent to monitoring for these purposes.
dirCould not chdir to home directory /home/john.doe: No such file or directory
Microsoft Windows [Version x.x.xxx]
(C) Copyright 1985-2003 Microsoft Corp.
C:\Program Files\OpenSSH>
收到上述提示后,它挂起。在这方面有什么帮助吗?