Are you a fan of SSH vs. virtual console access? I am. I much prefer to access a Linux/Unix vApp via SSH than via the remote console as this allows me to use Terminal on my Mac vs. opening a remote session to a virtual Windows system to then run the vSphere Infrastructure Client (VIC). It’s a personal preference, I admit. But enabling SSH does allow for direct SCP access as well.
Here’s how to enable SSH for the Horizon vApps.
I should note, SSH is actually already enabled but root login via SSH is not. So technically we are not enabling SSH but rather just enabling root login via SSH.
How to enable SSH root login on the Horizon Workspace Virtual Appliances:
- There’s no way around it – you need to login to a Windows system to launch either the vSphere Infrastructure Client (VIC) or the vSphere Web Client in order to open the virtual console of each of the virtual appliances within the Horizon Workspace vApp.
- Select LOGIN from the console Window and authenticate with the user “root” and the password you setup when installing the Horizon Workspace vApp.
- Once logged in, we need to edit the SSHD_CONFIG file. Type in the below command to edit the file with VI.
- The above command will open the SSHD_CONFIG file within VI and allow you to edit. To enable “Insert Mode” editing within VI, press “I“.
- Scroll down to Line 41 (down arrow). This should be the PermitRootLogin no line.
- Change PermitRootLogin no to PermitRootLogin yes
- Press the “ESC” key to exit the “Insert Mode” editing.
- Press “:” (colon) then “x” to save then exit.
- You now need to restart SSH in order for changes to take affect. Type the below command to restart SSH.
Conclusion and Recommendations:
You now have SSH and SCP enabled for the virtual appliance! Don’t forget to do this to the other virtual appliances within the Horizon Workspace vApp. It may also be wise to reverse these settings when done using SSH and SCP on the virtual appliances as well as ensuring strong passwords and security settings. To undo the above procedure, just change PermitRootLogin yes back to PermitRootLogin no and restart SSH.