Any idea why I'm getting this. I can successfully ping the server from my local machine. which sshpass is showing valid output and I'm using Cygwin64.
$ sshpass -p loriK0ba scp SSUA-HG.war SSUA-RCd.war loki12:/tmp/ARUNKS
lost connection
To install sshpass, I followed the following steps then, -V shows me valid output:
# 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
Version of sshpass is:
$ 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: When I run sshpass with the following command, it doesnt' error out but also not creating giga.txt file on the target server (thus it's not reaching / doing anything). Same user (case sensitive) exist on both local box (where Cygwin is running) and on the target machine.
sshpass -p loriK0ba ssh -q loki12 'rm -rf /tmp/ARUNKS/* 2>/dev/null; mkdir /tmp/ARUNKS 2>/dev/null'