Monday, August 24, 2020

SSH escape sequences and disconnect from session

The default character of invoking ssh escape sequence is '~' (from new line of course). Twice typing of such character send the escape character itself. In situations where several sequential connections to terminal (or to console, like Oracle Solaris Zone console via zlogin -C) are made, you should know one 'trick' to disconnect only from last connection made. 

Let me explain below. Let's start with session A - a session of your local machine. Here B - proxy vpn machine, C - Solaris server, D - newly installed Oracle Solaris Zone, not configured yet. 

A -- ssh_via_vpn_to_B --> B -- ssh_to_server_C --> C -- login_to_zone_console --> D

When you type exit ssh sequence '~.' you immediately close your first ssh session from A to B.In order to close only zlogin session and stay in session on server C, you should type '~~~.' Doing it you transmit escape character to the appropriate deeper session in your 'connection stack'. Take it in your mind. 

P.S. this doesn't work when ssh jumping or configured ssh proxy connection is used.

Tuesday, August 4, 2020

remmina throws "cannot connect to the 127.0.0.1 rdp server" over ssh tunnel

Hello !

    Remmina is one of my favorite desktop rdp/vnc client. Recently it's stopped to connect to MS Windows 2018 terminal server over ssh. The real cause was issued by xfreerdp which is called by Remmina. The error from freerdp was as :

[10:54:28:752] [8718:8719] [INFO][com.freerdp.core] - ERRINFO_LICENSE_HWID_DOESNT_MATCH_LICENSE (0x00000104):The Client Access License ([MS-RDPELE] section 1.1) stored by the client has been modified.
[10:54:28:752] [8718:8719] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex  ERRINFO_LICENSE_HWID_DOESNT_MATCH_LICENSE [0x00010104]

Running xfreerdp over strace lead to the file in the directory ~/.config/freerdp/licenses. I've renamed it, and after that the problem has gone (new license file was created).

Good Luck !!!