なぜ私がこれを手に入れているのか、どんな考えも。ローカル マシンからサーバーに正常に ping できます。どの sshpass が有効な出力を示しており、私は Cygwin64 を使用しています。
$ sshpass -p loriK0ba scp SSUA-HG.war SSUA-RCd.war loki12:/tmp/ARUNKS
lost connection
sshpass をインストールするには、次の手順に従い、-V を実行すると有効な出力が表示されます。
# IMPORTANT: You need to have sshpass utility installed on your local machine.
# ============================================================================
# HOW to get sshpass:
# STEPS: Run the following commands in Cygwin console window - This is a one time action.
# a. cd /cygdrive/c
# b. wget http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz
# c. tar -xvzpf sshpass-1.05.tar.gz
# d. cd sshpass-1.05
# e. sh configure
# f. make install
# g. which sshpass
# ============================================================================
.
sh configure; sleep 5; make install; sleep 5; which sshpass
sshpass のバージョンは次のとおりです。
$ sshpass -V
sshpass 1.05 (C) 2006-2011 Lingnu Open Source Consulting Ltd.
This program is free software, and can be distributed under the terms of the GPL
See the COPYING file for more information.
PS: 次のコマンドで sshpass を実行すると、エラーは発生しませんが、ターゲット サーバーに giga.txt ファイルが作成されません (したがって、到達も実行もされません)。同じユーザー (大文字と小文字を区別) が、ローカル ボックス (Cygwin が実行されている場所) とターゲット マシンの両方に存在します。
sshpass -p loriK0ba ssh -q loki12 'rm -rf /tmp/ARUNKS/* 2>/dev/null; mkdir /tmp/ARUNKS 2>/dev/null'