martin wrote:
https://winscp.net/eng/docs/scripting#hostkey
The documentation states:
winscp.com /command "open ""My session"" -hostkey=""ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"""
I tried:
C:\"program files (x86)"\winscp\winscp.com /command "open ""profile"" -hostkey=""ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "cd DPH_DERSS_Bioref_test" "option confirm off" "put *.*" "exit" /log="c:\sftp\de\log.txt"
I get back:
. 2011-04-21 08:10:46.404 --------------------------------------------------------------------------
. 2011-04-21 08:10:46.404 WinSCP Version 4.2.9 (Build 938) (OS 6.1.7600)
. 2011-04-21 08:10:46.404 Login time: Thursday, April 21, 2011 8:10:46 AM
. 2011-04-21 08:10:46.404 --------------------------------------------------------------------------
. 2011-04-21 08:10:46.404 Session name: profile
. 2011-04-21 08:10:46.404 Host name: sftp.dhss.delaware.gov (Port: 22)
. 2011-04-21 08:10:46.404 User name: profile (Password: No, Key file: No)
. 2011-04-21 08:10:46.404 Tunnel: No
. 2011-04-21 08:10:46.404 Transfer Protocol: SFTP (SCP)
. 2011-04-21 08:10:46.404 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2011-04-21 08:10:46.404 Proxy: none
. 2011-04-21 08:10:46.404 SSH protocol version: 2; Compression: No
. 2011-04-21 08:10:46.404 Bypass authentication: No
. 2011-04-21 08:10:46.404 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-04-21 08:10:46.404 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-04-21 08:10:46.404 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-04-21 08:10:46.404 SFTP Bugs: -,-
. 2011-04-21 08:10:46.404 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-04-21 08:10:46.404 Shell: default
. 2011-04-21 08:10:46.404 EOL: 0, UTF: 2
. 2011-04-21 08:10:46.404 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-04-21 08:10:46.404 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-04-21 08:10:46.404 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-04-21 08:10:46.404 Cache directory changes: Yes, Permanent: Yes
. 2011-04-21 08:10:46.404 DST mode: 1
. 2011-04-21 08:10:46.404 --------------------------------------------------------------------------
. 2011-04-21 08:10:46.404 Looking up host "sftp.dhss.delaware.gov"
. 2011-04-21 08:10:46.404 Connecting to 167.21.108.36 port 22
. 2011-04-21 08:10:46.451 Server version: SSH-2.0-SFTP_SERVER
. 2011-04-21 08:10:46.451 We believe remote version has SSH-2 ignore bug
. 2011-04-21 08:10:46.451 Using SSH protocol version 2
. 2011-04-21 08:10:46.451 We claim version: SSH-2.0-WinSCP_release_4.2.9
. 2011-04-21 08:10:46.466 Doing Diffie-Hellman group exchange
. 2011-04-21 08:10:46.685 Doing Diffie-Hellman key exchange with hash SHA-1
. 2011-04-21 08:10:46.981 Host key fingerprint is:
. 2011-04-21 08:10:46.981 ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
. 2011-04-21 08:10:46.981 Initialised AES-256 CBC client->server encryption
. 2011-04-21 08:10:46.981 Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-04-21 08:10:46.981 Initialised AES-256 CBC server->client encryption
. 2011-04-21 08:10:46.981 Initialised HMAC-SHA1 server->client MAC algorithm
! 2011-04-21 08:10:47.184 Using username "profile".
. 2011-04-21 08:10:47.215 Prompt (6, SSH password, , &Password: )
Any ideas?
Thanks.