openflighthpc / flight-desktop

Manage interactive GUI desktop sessions
Eclipse Public License 2.0
0 stars 2 forks source link

Misleading Port Numbers in Desktop Show #4

Closed ColonelPanics closed 4 years ago

ColonelPanics commented 4 years ago

This system has 2 desktops created. The second one (kde) is hosted on port 5902.

[centos@ip-172-31-11-223 ~]$ flight desktop ls
┌──────────┬───────┬──────────────────┬───────────────┬────────────────┬──────────┬────────┐
│ Identity │ Type  │ Host name        │ IP address    │ Display (Port) │ Password │ State  │
├──────────┼───────┼──────────────────┼───────────────┼────────────────┼──────────┼────────┤
│ 7945884f │ gnome │ ip-172-31-11-223 │ 34.245.35.127 │ :1 (5901)      │ Ijvp4Iz5 │ Active │
│ d0577203 │ kde   │ ip-172-31-11-223 │ 34.245.35.127 │ :2 (5902)      │ ZRtwVvPV │ Active │
└──────────┴───────┴──────────────────┴───────────────┴────────────────┴──────────┴────────┘

The above seems correct, however if I were to show the desktop session the session details are correct but the ssh forwarding example is a little misleading by defaulting to forwarding the port to 5901.

[centos@ip-172-31-11-223 ~]$ flight desktop show :2

== Session details ==

  Identity: d0577203-0674-4368-9f68-48f2e740e5d3
      Type: kde
   Host IP: 34.245.35.127
  Hostname: ip-172-31-11-223
      Port: 5902
   Display: :2
  Password: ZRtwVvPV

This desktop session is accessible from the public internet. However,
please be aware that desktop sessions accessed over the public
internet are not secure and steps should be taken to secure the link.

We highly recommend that you access your desktop session using 'ssh'
port forwarding:

  ssh -L 5901:localhost:5902 centos@34.245.35.127

Once the ssh connection has been established, depending on your
client, you can connect to the session using one of:

  vnc://centos:ZRtwVvPV@localhost:5901
  localhost:5901
  localhost:1

If, when connecting, you receive a warning as follows, try again with
a different port number, e.g. 5902, 5903 etc.:

  channel_setup_fwd_listener_tcpip: cannot listen to port: 5901

If prompted, you should supply the following password: ZRtwVvPV

My question/complaint here is: would it be more logical/consistent to use the same port on the ssh forward tunnel as the desktop session?