0

リモートサーバーでコマンドを実行するために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>  

上記のプロンプトが表示された後、ハングします。この点で何か助けはありますか?

4

3 に答える 3

1

これは現在機能しています。

plink -ssh -pw xxx john.doe@server cmd.exe /c move c://sample//jd//file.txt c://test//

于 2010-07-02T09:15:07.360 に答える