Topic "Automated SFTP Private Key Connection Using VB.Net 3.5"

Author Message
aeasth

Guest


Can anyone help?

Im trying to create an automated SFTP connection to retrieve a .txt file using VB.Net 3.5, but without success.

Im running Windows XP and need to connect to a SFTP site, authenticating with a username and private_key file, instead of using a password.

Can anyone advise what version of WinSCP I should download?

Can anyone point me in the direction of a working example for collecting a file, using WinSCP through VB.Net 3.5?

Many thanks,

Andy.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
aeasth wrote:
Can anyone point me in the direction of a working example for collecting a file, using WinSCP through VB.Net 3.5?

Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
aeasth

Guest


Hi, I've followed the "Full VB.NET example" on your website link https://winscp.net/eng/docs/guide_dotnet", but am encountering the following error - "An unhandled Win32 exception occurred in WINSCP3.COM [4376]" when running. Crying or Very sad

When I searched my machine for the WINSCP.COM file to include the path directory, the only file I found was WINSCP3.COM, so I suspect this is the cause of the problem Question . Should I download a different version of WinSCP, or is there a different reason for this error?

Many thanks, Andy.
aeasth

Guest


The previous problem was resolved by installing the latest version of winscp.

However, the example code now gives the message "An unhandled win32 exception occurred in WinSCP3.com [4376] Assertion failed: random_active >=0, file putty \SSHRAND.C, line 242

Has anyone ever come across this error, as this one has really stumped me... Crying or Very sad
aeasth

Guest


The unhandled 32 message was down to an incorrect destination path - all fixed.

However, I am now authenticating successfully, it starts the session... then falls over immediately with the message "connection has been unexpectedly closed. Server sent command exit status 0. Error skipping startup message. Your shell is probably incompatible with the application <Bash is recommended>"

However, I'm able to connect successfully with the same crudentials and private key and when I use the GUI for WinSCP, which allows me to navigate and view files on the FTP server.

I tried authenticating in the same way at the command line outside of .Net and was given the same error message. Again, I immediately tried using WinSCP GUI and obtained a solid connection. I'm looking to automate the process, so the GUI option isn't a solution I can opt for instead.

Any help is greatly appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Please upgrade to 4.2.7 and post a log file both from GUI and script.
_________________
Martin Prikryl
aeasth

Guest


Hi Martin, I upgraded to 4.2.7 but still encounter the same problem.

The VB.net log only contains the following information "<?xml version="1.0" encoding="UTF-8" ?>
<session xmlns="https://winscp.net/schema/session/1.0" name=" abcexcht.uk.test.corp " start="2010-03-09T14:07:17.359Z" /> "

The VB.Net code is as follows:


Imports System
Imports System.Diagnostics
Imports System.Diagnostics.Process
Imports System.Xml
Imports System.Xml.XPath

Module Module1

Sub Main()
Const logname As String = "log.xml"

'Run hidden WinSCP process
Dim WinSCP As Process = New Process()
WinSCP.StartInfo.FileName = "C:\Program Files\WinSCP\winscp.com"
WinSCP.StartInfo.Arguments = "/log=" + logname
WinSCP.StartInfo.UseShellExecute = False
WinSCP.StartInfo.RedirectStandardInput = True
WinSCP.StartInfo.RedirectStandardOutput = True
WinSCP.StartInfo.CreateNoWindow = True
WinSCP.Start()

'Feed in the scripting commands
WinSCP.StandardInput.WriteLine("option batch abort")
WinSCP.StandardInput.WriteLine("option confirm off")
WinSCP.StandardInput.WriteLine("open scp://abcexcht.uk.test.corp:22 -privatekey=C:\testuk.ppk")
WinSCP.StandardInput.WriteLine("testuk")
WinSCP.StandardInput.WriteLine("ls")
WinSCP.StandardInput.WriteLine("put c:\example.txt")
WinSCP.StandardInput.Close()

'Collect all output (not currently using in this code)
Dim output As String = WinSCP.StandardOutput.ReadToEnd()

'Wait until WinSCP finishes
WinSCP.WaitForExit()

'Parse and interpret the XML log (Note: If fatal failure occurs, no log may be created at all
Dim log As XPathDocument = New XPathDocument(logname)
Dim ns As XmlNamespaceManager = New XmlNamespaceManager(New NameTable())
ns.addnamespace("w", "https://winscp.net/schema/session/1.0")
Dim nav As XPathNavigator = log.CreateNavigator()

'Success (0) or error?
If WinSCP.ExitCode <> 0 Then

Console.WriteLine("Error occured")

'See if there are any messages associated with the errpr
For Each message As XPathNavigator In nav.Select("//w:message", ns)

Next

Else
'Look for directory listing even in case of error as possibly only the upload failed

Dim files As XPathNodeIterator = nav.Select("//w:file", ns)
Console.WriteLine(String.Format("There are {0} files and subdirectories:", files.Count))
For Each file As XPathNavigator In files
Console.WriteLine(file.SelectSingleNode("w:filename/@value", ns).Value)
Next
End If

End Sub

End Module



When I connect using the same open statement as above using the dos winscp.com dos prompt command, it:

Searches for host, connects to host, authenticating. It then prompts for a user name, at which point I enter testuk. It then authenticates with public key, prompts that it authenticated, starting the session� then it falls over with the same shell incompatibility message.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
What's the "testuk" command you are trying to execute?
_________________
Martin Prikryl
aeasth

Guest


testuk is the user name which is prompted for after the open command.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
OK. Can you check what in the "output" variable once the script finishes?
_________________
Martin Prikryl
aeasth

Guest


Hi Martin, the output variable contains the following:

output = "winscp> option batch abort batch abort winscp> option confirm off confirm off winscp> open scp://abcexcht.uk.test.corp:22 -privatekey=C:\testuk.ppk Searching for host... Connecting to host... Authenticating... Username: testuk... Authenticating with public key "testuk-SFTP". Authenticated. Starting the session... Connection has been unexpectedly closed. Server sent command exit status 1. Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
OK, so are you sure you can connect to the server using SCP?
_________________
Martin Prikryl
aeasth

Guest


Hi, when I connect using the WinSCP login GUI from the desktop with the same crudentials and key, I am able to sustain a connection and pull/push files. However, when I connect using the DOS WinSCP.com method or through .Net, it connects then rejects within seconds.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Can you post a plain log file showing both?
_________________
Martin Prikryl
aeasth

Guest


The GUI version log is as follows. This manual method of connection sustains its connection.

. 2010-03-18 11:03:50.342 --------------------------------------------------------------------------
. 2010-03-18 11:03:50.342 WinSCP Version 4.2.7 (Build 758) (OS 5.1.2600 Service Pack 2)
. 2010-03-18 11:03:50.342 Login time: 18 March 2010 11:03:50
. 2010-03-18 11:03:50.342 --------------------------------------------------------------------------
. 2010-03-18 11:03:50.342 Session name: testuk@abcexcht.uk.test.corp NEW TEST CONNECTION
. 2010-03-18 11:03:50.342 Host name: abcexcht.uk.test.corp (Port: 22)
. 2010-03-18 11:03:50.342 User name: testuk (Password: No, Key file: Yes)
. 2010-03-18 11:03:50.342 Tunnel: No
. 2010-03-18 11:03:50.342 Transfer Protocol: SFTP (SCP)
. 2010-03-18 11:03:50.342 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-03-18 11:03:50.342 Proxy: none
. 2010-03-18 11:03:50.342 SSH protocol version: 2; Compression: No
. 2010-03-18 11:03:50.342 Bypass authentication: No
. 2010-03-18 11:03:50.342 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-03-18 11:03:50.342 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-03-18 11:03:50.342 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-03-18 11:03:50.342 SFTP Bugs: -,-
. 2010-03-18 11:03:50.342 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-03-18 11:03:50.342 Shell: default, EOL: 0
. 2010-03-18 11:03:50.342 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-03-18 11:03:50.342 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-03-18 11:03:50.342 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-03-18 11:03:50.342 Cache directory changes: Yes, Permanent: Yes
. 2010-03-18 11:03:50.342 DST mode: 1
. 2010-03-18 11:03:50.342 --------------------------------------------------------------------------
. 2010-03-18 11:03:50.389 Looking up host "abcexcht.uk.test.corp"
. 2010-03-18 11:03:50.482 Connecting to 10.138.40.17 port 22
. 2010-03-18 11:03:50.686 Server version: SSH-2.0-OpenSSH_4.3
. 2010-03-18 11:03:50.686 Using SSH protocol version 2
. 2010-03-18 11:03:50.686 We claim version: SSH-2.0-WinSCP_release_4.2.7
. 2010-03-18 11:03:50.779 Doing Diffie-Hellman group exchange
. 2010-03-18 11:03:50.998 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-03-18 11:03:51.358 Host key fingerprint is:
. 2010-03-18 11:03:51.358 ssh-rsa 2027 e4:6c:70:38:3c:ab:4d:f1:1f:da:77:33:ea:e7:dd:e1
. 2010-03-18 11:03:51.358 Initialised AES-256 SDCTR client->server encryption
. 2010-03-18 11:03:51.358 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-03-18 11:03:51.358 Initialised AES-256 SDCTR server->client encryption
. 2010-03-18 11:03:51.358 Initialised HMAC-SHA1 server->client MAC algorithm
. 2010-03-18 11:03:51.561 Reading private key file "C:\SFTP\testuk.ppk"
! 2010-03-18 11:03:51.561 Using username "testuk".
. 2010-03-18 11:03:51.654 Offered public key
. 2010-03-18 11:03:51.748 Offer of public key accepted
! 2010-03-18 11:03:51.748 Authenticating with public key "testuk-SFTP"
. 2010-03-18 11:03:52.061 Access granted
. 2010-03-18 11:03:52.139 Opened channel for session
. 2010-03-18 11:03:52.373 Started a shell/command
. 2010-03-18 11:03:52.373 --------------------------------------------------------------------------
. 2010-03-18 11:03:52.373 Using SFTP protocol.
. 2010-03-18 11:03:52.373 Doing startup conversation with host.
> 2010-03-18 11:03:52.373 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-03-18 11:03:52.483 Type: SSH_FXP_VERSION, Size: 91, Number: -1
. 2010-03-18 11:03:52.483 SFTP version 5 negotiated.
. 2010-03-18 11:03:52.483 Server requests EOL sequence "\n".
. 2010-03-18 11:03:52.483 Server support information:
. 2010-03-18 11:03:52.483 Attribute mask: 8FFFFFFF, Attribute bits: 800003FF, Open flags: 7F
. 2010-03-18 11:03:52.483 Access mask: 1F8, Open block masks: 0, Block masks: 0, Max read size: 131072
. 2010-03-18 11:03:52.483 Attribute extensions (0)
. 2010-03-18 11:03:52.483 Extensions (2)
. 2010-03-18 11:03:52.483 space-available
. 2010-03-18 11:03:52.483 check-file
. 2010-03-18 11:03:52.483 We will use UTF-8 strings when appropriate
. 2010-03-18 11:03:52.483 Getting current directory name.
. 2010-03-18 11:03:52.483 Getting real path for '.'
> 2010-03-18 11:03:52.483 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-03-18 11:03:52.561 Type: SSH_FXP_NAME, Size: 48, Number: 16
. 2010-03-18 11:03:52.561 Real path is '/export/interfaces/TEST/UK'
. 2010-03-18 11:03:52.561 Listing directory "/export/interfaces/TEST/UK".
> 2010-03-18 11:03:52.561 Type: SSH_FXP_OPENDIR, Size: 39, Number: 267
< 2010-03-18 11:03:52.655 Type: SSH_FXP_HANDLE, Size: 10, Number: 267
> 2010-03-18 11:03:52.655 Type: SSH_FXP_READDIR, Size: 10, Number: 524
< 2010-03-18 11:03:52.748 Type: SSH_FXP_NAME, Size: 303, Number: 524
> 2010-03-18 11:03:52.748 Type: SSH_FXP_READDIR, Size: 10, Number: 780
< 2010-03-18 11:03:52.827 Type: SSH_FXP_STATUS, Size: 30, Number: 780
< 2010-03-18 11:03:52.827 Status code: 1
> 2010-03-18 11:03:52.827 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
. 2010-03-18 11:03:52.827 Startup conversation with host finished.
. 2010-03-18 11:03:55.186 Cached directory change via "UDC" to "/export/interfaces/TEST/UK/UDC".
. 2010-03-18 11:03:55.186 Getting current directory name.
. 2010-03-18 11:03:55.186 Listing directory "/export/interfaces/TEST/UK/UDC".
> 2010-03-18 11:03:55.186 Type: SSH_FXP_OPENDIR, Size: 43, Number: 1291
< 2010-03-18 11:03:55.186 Type: SSH_FXP_STATUS, Size: 26, Number: 1028
. 2010-03-18 11:03:55.186 Discarding reserved response
< 2010-03-18 11:03:55.296 Type: SSH_FXP_HANDLE, Size: 10, Number: 1291
> 2010-03-18 11:03:55.296 Type: SSH_FXP_READDIR, Size: 10, Number: 1548
< 2010-03-18 11:03:55.389 Type: SSH_FXP_NAME, Size: 299, Number: 1548
> 2010-03-18 11:03:55.389 Type: SSH_FXP_READDIR, Size: 10, Number: 1804
< 2010-03-18 11:03:55.467 Type: SSH_FXP_STATUS, Size: 30, Number: 1804
< 2010-03-18 11:03:55.467 Status code: 1
> 2010-03-18 11:03:55.467 Type: SSH_FXP_CLOSE, Size: 10, Number: 2052
. 2010-03-18 11:03:56.624 Cached directory change via "INT" to "/export/interfaces/TEST/UK/UDC/INT".
. 2010-03-18 11:03:56.624 Getting current directory name.
. 2010-03-18 11:03:56.624 Listing directory "/export/interfaces/TEST/UK/UDC/INT".
> 2010-03-18 11:03:56.624 Type: SSH_FXP_OPENDIR, Size: 47, Number: 2315
< 2010-03-18 11:03:56.624 Type: SSH_FXP_STATUS, Size: 26, Number: 2052
. 2010-03-18 11:03:56.624 Discarding reserved response
< 2010-03-18 11:03:56.718 Type: SSH_FXP_HANDLE, Size: 10, Number: 2315
> 2010-03-18 11:03:56.718 Type: SSH_FXP_READDIR, Size: 10, Number: 2572
< 2010-03-18 11:03:56.827 Type: SSH_FXP_NAME, Size: 1060, Number: 2572
> 2010-03-18 11:03:56.827 Type: SSH_FXP_READDIR, Size: 10, Number: 2828
< 2010-03-18 11:03:56.905 Type: SSH_FXP_STATUS, Size: 30, Number: 2828
< 2010-03-18 11:03:56.905 Status code: 1
> 2010-03-18 11:03:56.905 Type: SSH_FXP_CLOSE, Size: 10, Number: 3076
. 2010-03-18 11:04:00.062 Cached directory change via "ALL" to "/export/interfaces/TEST/UK/INT/ALL".
. 2010-03-18 11:04:00.062 Getting current directory name.
. 2010-03-18 11:04:00.062 Listing directory "/export/interfaces/TEST/UK/INT/ALL".
> 2010-03-18 11:04:00.062 Type: SSH_FXP_OPENDIR, Size: 51, Number: 3339
< 2010-03-18 11:04:00.062 Type: SSH_FXP_STATUS, Size: 26, Number: 3076
. 2010-03-18 11:04:00.062 Discarding reserved response
< 2010-03-18 11:04:00.156 Type: SSH_FXP_HANDLE, Size: 10, Number: 3339
> 2010-03-18 11:04:00.156 Type: SSH_FXP_READDIR, Size: 10, Number: 3596
< 2010-03-18 11:04:00.312 Type: SSH_FXP_NAME, Size: 299, Number: 3596
> 2010-03-18 11:04:00.312 Type: SSH_FXP_READDIR, Size: 10, Number: 3852
< 2010-03-18 11:04:00.406 Type: SSH_FXP_STATUS, Size: 30, Number: 3852
< 2010-03-18 11:04:00.406 Status code: 1
> 2010-03-18 11:04:00.406 Type: SSH_FXP_CLOSE, Size: 10, Number: 4100
. 2010-03-18 11:04:04.062 Changing directory to "IN".
. 2010-03-18 11:04:04.062 Getting real path for '/export/interfaces/TEST/UK/INT/ALL/IN'
> 2010-03-18 11:04:04.062 Type: SSH_FXP_REALPATH, Size: 54, Number: 4368
< 2010-03-18 11:04:04.062 Type: SSH_FXP_STATUS, Size: 26, Number: 4100
. 2010-03-18 11:04:04.062 Discarding reserved response
< 2010-03-18 11:04:04.141 Type: SSH_FXP_NAME, Size: 64, Number: 4368
. 2010-03-18 11:04:04.141 Real path is '/export/interfaces/TEST/UK/INT/ALL/IN'
. 2010-03-18 11:04:04.141 Trying to open directory "/export/interfaces/TEST/UK/INT/ALL/IN".
> 2010-03-18 11:04:04.141 Type: SSH_FXP_LSTAT, Size: 58, Number: 4615
< 2010-03-18 11:04:04.234 Type: SSH_FXP_ATTRS, Size: 61, Number: 4615
. 2010-03-18 11:04:04.234 Getting current directory name.
. 2010-03-18 11:04:04.234 Listing directory "/export/interfaces/TEST/UK/INT/ALL/IN".
> 2010-03-18 11:04:04.234 Type: SSH_FXP_OPENDIR, Size: 54, Number: 4875
< 2010-03-18 11:04:04.328 Type: SSH_FXP_HANDLE, Size: 10, Number: 4875
> 2010-03-18 11:04:04.328 Type: SSH_FXP_READDIR, Size: 10, Number: 5132
< 2010-03-18 11:04:04.437 Type: SSH_FXP_NAME, Size: 320, Number: 5132
> 2010-03-18 11:04:04.437 Type: SSH_FXP_READDIR, Size: 10, Number: 5388
< 2010-03-18 11:04:04.516 Type: SSH_FXP_STATUS, Size: 30, Number: 5388
< 2010-03-18 11:04:04.516 Status code: 1
> 2010-03-18 11:04:04.516 Type: SSH_FXP_CLOSE, Size: 10, Number: 5636
. 2010-03-18 11:04:06.797 Closing connection.
. 2010-03-18 11:04:06.797 Sending special code: 12
. 2010-03-18 11:04:06.797 Sent EOF message
aeasth

Guest


Please find below the failing DOS log. I just noticed the GUI connects with the SFTP protocol in the log, but when I use the dos commands mentioned earlier in the blog script above, the log shows it is connecting using SCP protocol. I suspect this is the problem, but how do I change the above mentioned DOS script to force connection using the SFTP protocol instead?

The dos log is as follows:

. 2010-03-18 12:05:04.501 --------------------------------------------------------------------------
. 2010-03-18 12:05:04.501 WinSCP Version 4.2.7 (Build 758) (OS 5.1.2600 Service Pack 2)
. 2010-03-18 12:05:04.501 Login time: 18 March 2010 12:05:04
. 2010-03-18 12:05:04.501 --------------------------------------------------------------------------
. 2010-03-18 12:05:04.501 Session name: testuk@abcexcht.uk.test.corp
. 2010-03-18 12:05:04.501 Host name: abcexcht.uk.test.corp (Port: 22)
. 2010-03-18 12:05:04.501 User name: (Password: No, Key file: Yes)
. 2010-03-18 12:05:04.501 Tunnel: No
. 2010-03-18 12:05:04.501 Transfer Protocol: SCP
. 2010-03-18 12:05:04.501 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-03-18 12:05:04.501 Proxy: none
. 2010-03-18 12:05:04.501 SSH protocol version: 2; Compression: No
. 2010-03-18 12:05:04.501 Bypass authentication: No
. 2010-03-18 12:05:04.501 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-03-18 12:05:04.501 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-03-18 12:05:04.501 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-03-18 12:05:04.501 SFTP Bugs: -,-
. 2010-03-18 12:05:04.501 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-03-18 12:05:04.501 Shell: default, EOL: 0
. 2010-03-18 12:05:04.501 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-03-18 12:05:04.501 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-03-18 12:05:04.516 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-03-18 12:05:04.516 Cache directory changes: Yes, Permanent: Yes
. 2010-03-18 12:05:04.516 DST mode: 1
. 2010-03-18 12:05:04.516 --------------------------------------------------------------------------
. 2010-03-18 12:05:04.516 Looking up host "abcexcht.uk.test.corp"
. 2010-03-18 12:05:04.516 Connecting to 10.138.40.17 port 22
. 2010-03-18 12:05:04.766 Server version: SSH-2.0-OpenSSH_4.3
. 2010-03-18 12:05:04.766 Using SSH protocol version 2
. 2010-03-18 12:05:04.766 We claim version: SSH-2.0-WinSCP_release_4.2.7
. 2010-03-18 12:05:04.860 Doing Diffie-Hellman group exchange
. 2010-03-18 12:05:05.079 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-03-18 12:05:05.501 Host key fingerprint is:
. 2010-03-18 12:05:05.501 ssh-rsa 2027 e4:6c:70:38:3c:ab:4d:f1:1f:da:77:33:ea:e7:dd:e1
. 2010-03-18 12:05:05.501 Initialised AES-256 SDCTR client->server encryption
. 2010-03-18 12:05:05.501 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-03-18 12:05:05.501 Initialised AES-256 SDCTR server->client encryption
. 2010-03-18 12:05:05.501 Initialised HMAC-SHA1 server->client MAC algorithm
. 2010-03-18 12:05:05.657 Reading private key file "C:\SFTP\testuk.ppk"
. 2010-03-18 12:05:05.657 Prompt (1, SSH login name, , login as: )
. 2010-03-18 12:05:08.814 Offered public key
. 2010-03-18 12:05:08.955 Offer of public key accepted
! 2010-03-18 12:05:08.955 Authenticating with public key "testuk-SFTP"
. 2010-03-18 12:05:09.298 Access granted
. 2010-03-18 12:05:09.392 Opened channel for session
. 2010-03-18 12:05:09.611 Started a shell/command
. 2010-03-18 12:05:09.611 --------------------------------------------------------------------------
. 2010-03-18 12:05:09.611 Using SCP protocol.
. 2010-03-18 12:05:09.611 Doing startup conversation with host.
. 2010-03-18 12:05:09.611 Skipping host startup message (if any).
> 2010-03-18 12:05:09.611 echo "WinSCP: this is end-of-file:0"
! 2010-03-18 12:05:09.705 -MySecureShell: /lib/libcrypto.so.0.9.8: no version information available (required by -MySecureShell)
. 2010-03-18 12:05:09.705 Server sent command exit status 1
. 2010-03-18 12:05:09.705 Disconnected: All channels closed
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
aeasth wrote:
I suspect this is the problem, but how do I change the above mentioned DOS script to force connection using the SFTP protocol instead?

Just change scp:// to sftp:// in your code.
_________________
Martin Prikryl
aeasth

Guest


Hi,

Many thanks. All now working Cool
sYpram

Guest


can you possibly share the script?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License