WinSCP 5.1.4 GSSAPI for tunnel connexion

Advertisement

Guest

WinSCP 5.1.4 GSSAPI for tunnel connexion

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,

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: WinSCP 5.1.4 GSSAPI for tunnel connexion

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.

Reply with quote

Swindellvc@cofc.edu
Joined:
Posts:
12
Location:
Charleston, SC

Error trying to run vb code

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

Reply with quote E-mail

Swindellvc@cofc.edu
Joined:
Posts:
12
Location:
Charleston, SC

Re: Error trying to run vb code

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

Reply with quote E-mail

Advertisement

Swindellvc@cofc.edu
Joined:
Posts:
12
Location:
Charleston, SC

Re: Error trying to run vb code

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)

Reply with quote E-mail

martin
Site Admin
martin avatar

Re: Session Log

Swindellvc@cofc.edu wrote:

Where are the session logs?
To generate the session log file with .NET assembly, set Session.SessionLogPath.

Reply with quote

Advertisement

Swindellvc@cofc.edu
Joined:
Posts:
12
Location:
Charleston, SC

Re: Session Log

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

Description: Error

Capture.PNG

Reply with quote E-mail

Advertisement

You can post new topics in this forum