Topic "WinSCP 5.1.4 GSSAPI for tunnel connexion"

Author Message
Guest




Hi all,

I have a problem with GSSAPI authentication.
It does work on my server directly, but it does work on my server when I use it as a tunnel.
It tells me "No supported authentication methods available (server sent: publickey, gssapi-keyex,gssapi-with-mic)."

Regards,
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
Swindellvc@cofc.edu
[View user's profile]

Joined: 2016-07-08
Posts: 7
Location: Charleston, SC
I'm running the following program based on your VBA Example

Dim sMsg As String = vbNull
Dim mySessionOptions As New WinSCP.SessionOptions
mySession.DisableVersionCheck = True
With mySessionOptions
.Protocol = Protocol.Sftp
.PortNumber = 22
.HostName = "<removed>"
.SshPrivateKeyPassphrase = "<Removed>"
.UserName = "cofc"
.SshHostKeyFingerprint = "<Removed>"
.SshPrivateKeyPath = "M:\ITExtracts\SSHKEY\myKey.ppk"
End With

' Connect
mySession.Open(mySessionOptions)

' Upload files

Dim MyTransferOptions As New WinSCP.TransferOptions
myTransferOptions.TransferMode = TransferMode.Binary

Dim transferResult As TransferOperationResult
transferResult = mySession.PutFiles("M:\ITExtracts\studentlist*", "/studentlists/", False, MyTransferOptions)
' Throw on any error
transferResult.Check()

' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
sMsg = "Upload of " & transfer.FileName & " succeeded"
MsgBox(sMsg, MsgBoxStyle.Information)

Next

End Sub




Error: Disconnected: No supported authentication methods available (server sent: publickey,gssapi-with mic)

How can I resolve this error
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Can you login in GUI?
Swindellvc@cofc.edu
[View user's profile]

Joined: 2016-07-08
Posts: 7
Location: Charleston, SC
martin wrote:
Can you login in GUI?


Yes...currently I'm uploading the file manually everyday
I'm trying to create a program that I have schedule to run daily
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
So show us session log files both from GUI and the code.
Swindellvc@cofc.edu
[View user's profile]

Joined: 2016-07-08
Posts: 7
Location: Charleston, SC
Where are the session logs?
Swindellvc@cofc.edu
[View user's profile]

Joined: 2016-07-08
Posts: 7
Location: Charleston, SC
martin wrote:
So show us session log files both from GUI and the code.

This is the one from GUI


' Setup session options

Dim sMsg As String = vbNull
Dim mySessionOptions As New WinSCP.SessionOptions
mySession.DisableVersionCheck = True
With mySessionOptions
.Protocol = Protocol.Sftp
.PortNumber = 22
.HostName = "cofc.erezlife.com"
.SshPrivateKeyPassphrase = "Removed"
.UserName = "cofc"
.SshHostKeyFingerprint = "Removed"
'.SshPrivateKeyPath = "\\aiken\ProdCognos\ITExtracts\SSHKEY\myKey.ppk"
.SshPrivateKeyPath = "M:\ITExtracts\SSHKEY\myKey.ppk"
End With

' Connect
mySession.Open(mySessionOptions)

' Upload files

Dim MyTransferOptions As New WinSCP.TransferOptions
myTransferOptions.TransferMode = TransferMode.Binary

Dim transferResult As TransferOperationResult
'transferResult = mySession.PutFiles("\\aiken\ProdCognos\ITExtracts\studentlist.csv", "/studentlists/", False, myTransferOptions)
transferResult = mySession.PutFiles("M:\ITExtracts\studentlist*", "/studentlists/", False, MyTransferOptions)
' Throw on any error
transferResult.Check()

' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
sMsg = "Upload of " & transfer.FileName & " succeeded"
MsgBox(sMsg, MsgBoxStyle.Information)

Next

End Sub
cofc@cofc.erezlife.com.log (30.25 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Swindellvc@cofc.edu wrote:
Where are the session logs?

To generate the session log file with .NET assembly, set Session.SessionLogPath.
Swindellvc@cofc.edu
[View user's profile]

Joined: 2016-07-08
Posts: 7
Location: Charleston, SC
martin wrote:
Swindellvc@cofc.edu wrote:
Where are the session logs?

To generate the session log file with .NET assembly, set Session.SessionLogPath.



When I added this...I got a different error "Error: Error occurred during logging. It's been turned off."

This is what was added

Dim mySession As New Session

With mySession
.SessionLogPath = "C:\Development\LOGS\"
End With

Upload(mySession) <- This is the code I sent


Private Sub Upload(ByRef mySession As Session)

' Setup session options

Dim sMsg As String = vbNull
Dim mySessionOptions As New WinSCP.SessionOptions

mySession.DisableVersionCheck = True
With mySessionOptions
.Protocol = Protocol.Sftp
.PortNumber = 22
.HostName = "REMOVED"
.SshPrivateKeyPassphrase = "REMOVED"
.UserName = "cofc"
.SshHostKeyFingerprint = "REMOVED"
'.SshPrivateKeyPath = "\\aiken\ProdCognos\ITExtracts\SSHKEY\myKey.ppk"
.SshPrivateKeyPath = "M:\ITExtracts\SSHKEY\myKey.ppk"
End With

' Connect
mySession.Open(mySessionOptions)

' Upload files

Dim MyTransferOptions As New WinSCP.TransferOptions
myTransferOptions.TransferMode = TransferMode.Binary

Dim transferResult As TransferOperationResult
'transferResult = mySession.PutFiles("\\aiken\ProdCognos\ITExtracts\studentlist.csv", "/studentlists/", False, myTransferOptions)
transferResult = mySession.PutFiles("M:\ITExtracts\studentlist*", "/studentlists/*.*", False, MyTransferOptions)
' Throw on any error
transferResult.Check()

' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
sMsg = "Upload of " & transfer.FileName & " succeeded"
MsgBox(sMsg, MsgBoxStyle.Information)

Next

End Sub
Capture.PNG (22.32 KB)

Description: Error

Capture.PNG

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
The SessionLogPath is a path to a log file. Not a path to a directory to store a log file.
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