Today I was playing with Tunnelier for Windows and so I discovered some nice command line tools. During installation of the free Tunnelier, several command line tools are automatically installed:
- sftpc
- sexec
Sftpc is an advanced command-line SFTP.
USAGE:
sftpc [username@]host[:port] OR -profile=file [-host=host] [-port=port]
[-spn=SPN] [-sspi=y|n] [-dlg=y|n]
[-user=username] [-gka] [-gma [-krb OR -ntlm]] [-pk=slot [-pp=passphrase]]
[-pw=password] [-kbdi [-sub=submethods]]
[-cmd=commands OR -cmdFile=file [-ce]] [-bg]
[-encr=list] [-mac=list] [-cmpr=list] [-dhkex=list] [-hkey=list] [-ka=y|n]
[-kre=y|n]
[-unat=y|n]
[-noRegistry OR -baseRegistry=registry-key]
[-proxy=y|n [-proxyType=type] -proxyServer=server [-proxyPort=port]
[-proxyUsername=username [-proxyPassword=password]]
[-proxyResolveLocally]]
[-hostKeyMD5=MD5-fingerprint] [-hostKeyBB=Bubble-Babble]
[-hostKeyFile=file]
[-keypairFile=file [-keypairPassphrase=passphrase]]
[-traceLevel=level [-traceFile=file]]
I did a test and connected to a remote OpenSSH server, like this:
sftpc username@ip-address:port -pw=password -cmd="put this_local_file.txt"
It works like a charm, and you can up- and download files via your well known dosbox.
With Sexec, a scriptable command-line remote execution client, you can execute programs on remote machines from a batch file.
For example:
sexec username@ip-address:port -pw=password -cmd="cd /var/www/mysite;ls"
USAGE:
sexec [username@]host[:port] OR -profile=file [-host=host] [-port=port]
[-spn=SPN] [-sspi=y|n] [-dlg=y|n]
[-user=username] [-gka] [-gma [-krb OR -ntlm]] [-pk=slot [-pp=passphrase]]
[-pw=password] [-kbdi [-sub=submethods]]
[-encr=list] [-mac=list] [-cmpr=list] [-dhkex=list] [-hkey=list] [-ka=y|n]
[-kre=y|n]
[-unat=y|n]
[-noRegistry OR -baseRegistry=registry-key]
[-proxy=y|n [-proxyType=type] -proxyServer=server [-proxyPort=port]
[-proxyUsername=username [-proxyPassword=password]]
[-proxyResolveLocally]]
[-hostKeyMD5=MD5-fingerprint] [-hostKeyBB=Bubble-Babble]
[-hostKeyFile=file]
[-keypairFile=file [-keypairPassphrase=passphrase]]
[-traceLevel=level [-traceFile=file]]
[-shell OR -cmd=command OR command]
Another example:
sexec username@ip-address:port -pw=password -cmd="
/usr/local/bin/sendEmail -f username@gmail.com -t recipient@mail.com -s smtp.gmail.com:587 -xu username -xp password -o tls=yes -u ssh testje -m testje"
Comments