sshpass - scp错误 - 连接丢失

时间:2015-02-11 19:59:23

标签: connection cygwin runtime-error scp sshpass

知道我为什么会这样做。我可以从本地计算机成功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'

0 个答案:

没有答案