Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

msenatore

Re: Background Script Question

martin wrote:



OK, I got it to work. I had to login under our Windows service account and go through the login process and now my background process is working properly.

Thanks for your help.
Mike
msenatore

Re: Background Script Question

I ran my batch file from a Windows command window and it runs perfectly and doesn't ask any questions. I then tried it from the background again and it hangs up on this "Password" question still.

Any way around this? I need to get this working.

Thanks,
Mike
msenatore

Re: Background Script Question

martin wrote:

Save the password into the profile.


Yes, I do have my password saved into the GUI profile if that's what you mean. I open the GUI and edit it and it is there and I can login without having to enter it.

Anything else?

Thanks,
Mike
martin

Re: Background Script Question

Save the password into the profile.
msenatore

Re: Background Script Question

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.
msenatore

Background Script Question

I'm running a background script and I get the following prompt in the log file. Is there a switch or parameter that I can use to override this?

If I run my batch file in the foreground, it doesn't stop and ask me this question.

WinsCP 4.2.9 (build 938)

MS Windows 2008 Server (64-bit)

{script}
\"program files (x86)"\winscp\winscp.com /command "open profile" "cd DPH_DERSS_Bioref_test" "option confirm off" "put *.*" "exit" /log="\sftp\de\log.txt"

{log}
. 2011-04-14 18:42:44.325 The server's dss key fingerprint is:
. 2011-04-14 18:42:44.325 ssh-dss 1024 {removed for post}
. 2011-04-14 18:42:44.325
. 2011-04-14 18:42:44.325 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2011-04-14 18:42:44.325
. 2011-04-14 18:42:44.325 Continue connecting and add host key to the cache? ()

Thanks,
Mike