Bug #92299 SSH Hostname in TCP/IP over SSH Not Parsed Correctly
Submitted: 5 Sep 2018 17:09 Modified: 10 Sep 2018 16:03
Reporter: Aaron Chamberlain Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:8.0.12 OS:Ubuntu (Linux Mint 19 (18.04))
Assigned to: CPU Architecture:x86
Tags: remote management, ssh

[5 Sep 2018 17:09] Aaron Chamberlain
Description:
I am unable to connect to one of my database instances because the server connects over SSH on a non standard port (10251). According to your documentation after selecting the Standard TCP/IP over SSH Connection Mode the SSH Hostname format is <host>:<port>. I have it like so example.host.com:10251.

After filling out the other required fields like my ssh username/password and mysql username/password I hit "Test Connection" and it immediately brings up a password dialog trying to connect to <user>@example.host.com:22. So even if provided with the right password, it did not successfully parse my non-standard port and of course will fail.

I have also attempted this through the TCP/IP Mode and Changing Remote Management to SSH. Even with a dedicated field, it does not seem to consider my non-standard SSH Port.

How to repeat:
Install 8.0.12 on a Ubuntu Host. Create a new connection, choose TCP/IP over SSH as the Connection Method. Enter in all fields as required, with the SSH Hostname as example.host.com:10251. Test Connection and note that it did not parse the pattern correctly.
[8 Sep 2018 7:08] MySQL Verification Team
Hello Aaron,

Thank you for the report.
Could you please confirm on why you are specifying port "10251" with the SSH host name?  Is your SSH Server listening on non-default port? If it is default then no need to specify port number with the SSH host name.  Thank you!

regards,
Umesh
[8 Sep 2018 8:31] MySQL Verification Team
Confirmed that there is no issues - MySQL Workbench hosted on Win7, MySQL Server hosted on Ubuntu box and with connection method TCP/IP over SSH - attempted first with default port i.e SSH Host name listening on default i.e 22 port and later changed sshd port 10251 and still able to connect.

==
ushastry@BionicBeaver:~$ service ssh status
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-09-08 04:16:58 EDT; 5s ago
  Process: 3336 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 3337 (sshd)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/ssh.service
           └─3337 /usr/sbin/sshd -D

Sep 08 04:16:58 BionicBeaver systemd[1]: Starting OpenBSD Secure Shell server...
Sep 08 04:16:58 BionicBeaver sshd[3337]: Server listening on 0.0.0.0 port 22.
Sep 08 04:16:58 BionicBeaver sshd[3337]: Server listening on :: port 22.
Sep 08 04:16:58 BionicBeaver systemd[1]: Started OpenBSD Secure Shell server.

^^ MySQL Workbench 8.0.12, connected to MySQL Server hosted on Ubuntu 18.04(sshd listening on default port i.e 22) using connection method TCP/IP over SSH - no issues observed

ushastry@BionicBeaver:~$ sudo vi /etc/ssh/sshd_config 
ushastry@BionicBeaver:~$ sudo service sshd restart
ushastry@BionicBeaver:~$ service ssh status
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-09-08 04:18:42 EDT; 3s ago
  Process: 3425 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 3426 (sshd)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/ssh.service
           └─3426 /usr/sbin/sshd -D

Sep 08 04:18:42 BionicBeaver systemd[1]: Starting OpenBSD Secure Shell server...
Sep 08 04:18:42 BionicBeaver sshd[3426]: Server listening on 0.0.0.0 port 10251.
Sep 08 04:18:42 BionicBeaver sshd[3426]: Server listening on :: port 10251.
Sep 08 04:18:42 BionicBeaver systemd[1]: Started OpenBSD Secure Shell server.
ushastry@BionicBeaver:~$ 

^^ MySQL Workbench 8.0.12, connected to MySQL Server hosted on Ubuntu 18.04(sshd listening on non-default port i.e 10251) using connection method TCP/IP over SSH - no issues observed
[8 Sep 2018 8:32] MySQL Verification Team
Screenshot -  TCP/IP over SSH

Attachment: 92299.png (image/png, text), 70.16 KiB.

[10 Sep 2018 16:03] Aaron Chamberlain
Thanks for the initial debug. I should have been clearer but I guess there wasn't enough fields. I am running my Guest Client/Workbench on Linux Mint 19 (Ubuntu 18.04) and my MariaDB Server (5.5.61) is running on CentOS 7.

When accessing my servers over SSH I do indeed use the port 10251.

My SSH Hostname field does indeed read "<subnet>.<host>:10251" where of course the two fields are replaced by my normal DNS URL that I daily for SSH.