SFTP plugin under VPN

English support forum

Moderators: Hacker, petermad, Stefan2, white

obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

SFTP plugin under VPN

Post by *obmana »

I use TC on Ubuntu and SFTP plugin works great as ssh interface.
But if I try to connect to a server that I access with VPN, SFTP plugin can't connect - it raises familiar dialog, and it seems like it connects, but panels stay same.

Any ideas what may be wrong?
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

Post by *seb- »

Can you double click onto the small "log" that appears below the button bar?
Maybe there is some more info...

Also, do you have access to the servers syslog or sshd log?
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

seb-, thanks for your reply

I can't see any "small log" bellow button bar, and I have no access of course to system logs on the server. I see familiar connection dialog from TC, with text box saying "From: Session startup" and progress bar filling like in other ssh connections, but nothing really happens.

I was hoping for some log from SFTP plugin but cant find any.
Does SFTP plugin write logs somewhere?
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

So this is the familiar dialog:

Image: http://i.imgur.com/4fpBVU0.png

and it seems like I do have access to logs.

The output from `sudo grep 'sshd' /var/log/auth.log` on server while trying to connect several times:

Code: Select all

Jun 10 06:44:43 *** sshd[30279]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:45:33 *** sshd[30311]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:55:00 *** sshd[30690]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:55:20 *** sshd[30715]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:55:48 *** sshd[30724]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:56:01 *** sshd[30747]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
Jun 10 06:56:23 *** sshd[30755]: Received disconnect from **.***.**.**: 11: Shutdown [preauth]
[edit]
And in `/var/log/syslog` I have:

Code: Select all

Jun 10 08:15:13 *** sssd[be[LDAP]]: dereference processing failed : Invalid argument
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50486
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I need to see the log from TC, not from the server. Please enable logging in TC menu Configuration - Options - FTP. This also enables logging for all plugins.
Author of Total Commander
https://www.ghisler.com
whytea
Member
Member
Posts: 135
Joined: 2006-02-18, 11:58 UTC

Post by *whytea »

Just to share my experience with OpenVPN. TC sftp plugin works for me to some SuSE servers but not others. I never managed to find out why.

However, I never have anything problem with the sftp from mobaxterm or winscp.
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

ghisler(Author) wrote:I need to see the log from TC, not from the server. Please enable logging in TC menu Configuration - Options - FTP. This also enables logging for all plugins.
This is the log content:
Loading SSH Library
========================
Connecting to: 10.100.30.127
IP address: 10.100.30.127:22
Server fingerprint:
8A 7E EC F0 DD 05 8C F8 09 C2 4C 53 14 B4 CA C5
Supported authentication methods: publickey
That's all
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50486
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So did you configure a public and private key (for client certificate authentication) to access the server?
Author of Total Commander
https://www.ghisler.com
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

Yes, I've sent my pub key to server administrator, and I can login from terminal or MC, etc, after connecting to VPN.

With ssh it looks like this:

Code: Select all

ssh <my_name>@<ip-address>
but I made ssh config in my ~/.ssh folder, to connect easier with "alias":

Code: Select all

Host demo
	User <my_name>
	Hostname <ip-address>
	Port 22
	IdentityFile ~/.ssh/id_rsa
So I connect with `ssh demo` and it works as expected in linux environment, but perhaps there is a problem with VPN under Wine?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50486
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, could be - try running tc from a command line (shell) by running wine with TC as parameter. Wine will show errors on the command line if functions are missing or not implemented.
Author of Total Commander
https://www.ghisler.com
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

Ok, here it is:

1. this is wine log where I successfully connect to server (w/o VPN):

Code: Select all

fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:process:GetProcessWorkingSetSize (0xffffffff,0x73e92c,0x73e930): stub
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e654,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:win:RegisterDeviceNotificationA (hwnd=0x13d108, filter=0x93e598,flags=0x00000001) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:font:freetype_SelectFont Untranslated charset 255
fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
fixme:font:freetype_SelectFont Untranslated charset 255
fixme:win:RegisterDeviceNotificationW (hwnd=0x100f2, filter=0xd2e8d8,flags=0x00000000) returns a fake device notification handle!
fixme:winstation:GetUserObjectSecurity (0xdc 0x33e120 0xfb28b4 len=1024 0x33e110),stub!
fixme:winstation:GetUserObjectSecurity (0xfffffffe 0x33e120 0xfb2cb8 len=1024 0x33e110),stub!
fixme:win:RegisterDeviceNotificationW (hwnd=0x100f2, filter=0xd2e900,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterDeviceNotificationW (hwnd=0x100f2, filter=0xd2e8d8,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterDeviceNotificationW (hwnd=0x100f2, filter=0xd2e900,flags=0x00000000) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\My Network Places"
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
2. this is wine log when I cannot make connection (w/ VPN):

Code: Select all

fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:shell:SHGetFileInfoW set icon to shell size, stub
fixme:font:freetype_SelectFont Untranslated charset 255
fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
fixme:font:freetype_SelectFont Untranslated charset 255
fixme:winstation:GetUserObjectSecurity (0x8 0x33e120 0xfc28b4 len=1024 0x33e110),stub!
fixme:winstation:GetUserObjectSecurity (0xfffffffe 0x33e120 0xfc2cb8 len=1024 0x33e110),stub!
fixme:win:RegisterDeviceNotificationW (hwnd=0x20132, filter=0xd3e8d8,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterDeviceNotificationW (hwnd=0x20132, filter=0xd3e8d8,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterDeviceNotificationW (hwnd=0x20132, filter=0xd3e900,flags=0x00000000) returns a fake device notification handle!
fixme:win:RegisterDeviceNotificationW (hwnd=0x20132, filter=0xd3e900,flags=0x00000000) returns a fake device notification handle!
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
fixme:shell:ISF_NetworkPlaces_fnParseDisplayName not implemented for L"\\\\My Network Places"
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:win:UnregisterDeviceNotification (handle=0xcafeaffe), STUB!
I can only notice that wine log with VPN, is missing first ~30 lines in comparison to "normal" network connection.


I also tried the suggestion from @whytea, and WinSCP indeed connects fine even with VPN. I only had to regenerate my keys in putty format...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50486
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it doesn't look like unimplemented APIs.

Since TC uses OpenSSH, can you try to connect to that server with OpenSSH for Windows? Maybe it shows detailed error of why connection fails...
Author of Total Commander
https://www.ghisler.com
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

I tried OpenSSH from sourceforge, but it crashes:

Code: Select all

$ wine ssh
err:service:service_send_start_message service L"JavaQuickStarterService" failed to start
fixme:service:scmdatabase_autostart_services Auto-start service L"JavaQuickStarterService" failed to start: 1053
fixme:ntdll:NtSetInformationToken unimplemented class 4
     78 [main] ssh 8 tty_list::allocate_tty: No tty allocated
Segmentation fault (core dumped)
From the comments on sourceforge it seems that port implementation is very poor, and project is abandoned.

Then I tried another compile (again cygwin) from http://www.mls-software.com/opensshd.html, with this wine log:

Code: Select all

fixme:ntdll:NtSetInformationToken unimplemented class 4
fixme:ntdll:NtQueryInformationProcess (process=0xffffffff) Unimplemented information class: ProcessSessionInformation
fixme:advapi:LsaOpenPolicy ((null),0x61280ce4,0x00000001,0x6bc324) stub
fixme:advapi:LsaClose (0xcafe) stub
fixme:netapi32:NetUserGetInfo Level 3 is not implemented
fixme:ntdll:NtQueryVolumeInformationFile 0xf0: volume info not supported
fixme:ntdll:NtQueryVolumeInformationFile 0xf0: faking attribute info
fixme:ntdll:NtQueryVolumeInformationFile 0xf0: faking attribute info
fixme:ntdll:NtQueryVolumeInformationFile 0xf0: faking attribute info
fixme:netapi32:NetLocalGroupGetInfo ((null) L"Administrators" 1 0x6bc388) semi-stub!
fixme:advapi:LsaOpenPolicy ((null),0x61280ce4,0x00000800,0x6bc9a4) stub
fixme:advapi:LsaClose (0xcafe) stub
wine: Unhandled page fault on read access to 0x00000002 at address 0x6113f655 (thread 0041), starting debugger...
err:dbghelp_msc:pe_load_debug_directory Got a page fault while loading symbols
fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}
and this Program Error: https://gist.githubusercontent.com/anonymous/0378bd1bb5c9a3859d20/raw/573c1133198a84e1959adf42aee858ad731bbcb9/openssh%20backtrace

If you perhaps have suggestion for some OpenSSH implementation not under cygwin I'll try again.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50486
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, looks like Wine is missing a lot of functions needed by OpenSSH. But since you don't get this error from TC, it shouldn't be causing the problem. I can only guess that one of the used functions is incompletely implemented by Wine...
Author of Total Commander
https://www.ghisler.com
obmana
Junior Member
Junior Member
Posts: 53
Joined: 2013-08-28, 15:35 UTC

Post by *obmana »

Ok, then...

Thanks for your support
Post Reply