リモートサーバーでコマンドを実行するためにPlinkを使用しようとしています。ローカルマシンとリモートマシンはどちらもWindowsです。Plinkを使用してリモートマシンに接続できますが、「-mfile」オプションを使用できません。私は次の3つの方法を試しましたが、役に立ちませんでした。
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という1つのコマンドのみが含まれています
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>
上記のプロンプトが表示された後、ハングします。この点で何か助けはありますか?