Showing results for 
Search instead for 
Did you mean: 
Flight Engineer
Flight Engineer

Tips: SSH Login to Labs for CUI Preference

Hi colleagues,

This pertains to the recent conversation initiated by @crixus1 about "Redhat Learning Labs". It led me to question if anyone else prefers using SSH login from their local PC to the Lab, merely favoring CLI over the Web GUI rather than due to the corporate firewall restrictions or policies as mentioned by @crixus1. I personally utilize SSH remote port forwarding for this purpose since CLI is faster than GUI, and I am sharing the method below:


  • Initial Access to the Lab via Web GUI is yet necessary to establish an SSH tunnel.

  • An SSH server is operational on your local PC.

  • Your local PC has a global IP address to receive incoming SSH requests.
    • If this is not the case, a cloud computing resource like AWS EC2 can be used. It's possible to establish an EC2 instance with a global IP address to serve as an SSH bastion server, and this can be done within the free tier at no cost.


  1. As usual, start the Redhat Lab and log in to the workstation via Web GUI.

  2. From the workstation, set up an SSH connection to your local PC with remote port forwarding:

    [student@workstation ~] $ ssh -R 2222:localhost:22 your-user-id@your-local-host

    This session shall be kept connected until you finish Lab excersise.
  3. Open terminal on your local PC (Not via the Web GUI), and do SSH login to the Lab via the established SSH tunnel port. After this you don't need to use the Web GUI.

    Example: RH294 Lab

    [your-user-id@your-local-host ~] $ ssh -p 2222 student@localhost

    student@localhost's password:

    [student@workstation ~] $ hostname
    [student@workstation ~]$ getent hosts server{a..d}


Labels (2)
2 Replies
Flight Engineer
Flight Engineer

Since this approache still requires the initial setup via Web GUI, it cannot address the use case of @crixus1. Neverthless it proves particulary beneficial for courses that require extensive amount of typing like the Ansible course, given that the response of SSH CLI is typically faster than Web GUI. It also makes copying and pasting from and into the Lab environment considerably easier.

Since this thread is not about question I don't expect answer. But it would be great if anybody can share your BKM.



Hi @tnishiok 

Thank you, this is really handy. Having all that done I've updated my ssh config file as on the example below:

Host host1
User user1

Host host2
Hostname localhost
Port 2222
DynamicForward 5555
User student
ProxyJump host1

Then from the second terminal we connect via ssh to host2, then configure Firefox to use a sock proxy ( so that we can access all web services/labs directly from our local browser.

0 Kudos
Join the discussion
You must log in to join this conversation.