Enhancement: Ability to change SSH link on Device page

I want to add the ability too, optionally, change the action of the SSH icon on the device page.

I’m playing with GateOne at the moment and have altered the devices page so the SSH links open a web-terminal rather than a straight ssh:// type link.

This is pretty easy to do, so I’m wondering how I go about adding this as an option to config.php?

Essentially just need to be able to change this: <a href="ssh://' . $device['hostname'] . '"><i class="fa fa-lock fa-lg icon-theme" title="SSH to ' . $device['hostname'] . '"></i></a> based on an option in config.php

Mine is currently: <a href="https://librenmsServer:10443?ssh=ssh://' . $device['hostname'] . '">

It would also be nice to build in GateOne…


1 Like

you should add : &location=’ . $device[‘hostname’] .'
So you will have that :

so you can open several terminals


Good point!

Although if the hostname is an IP address it doesn’t work… :frowning:

Hi All,

Anyone know how I add this as a config.php option?

Im also curious how to implement this

1 Like

Ok, i got it to work…

Had to edit these three files:


Each with (added username :smile: ):

<a href="https://10.x.x.x/gateone/?ssh=ssh://'.$_SESSION['username'].'@'.$device['hostname'].'"><i class="fa fa-lock fa-lg icon-theme"  title="SSH to ' . $device['hostname'] . '"></a>
<li><a href="https://10.x.x.x/gateone/?ssh=ssh://'.$_SESSION['username'].'@'.$device['hostname'].'" target="_blank" rel="noopener"><i class="fa fa-lock fa-lg icon-theme"  aria-hidden="true"></i> SSH</a></li>
<div class="col-xs-1"><a href="https://10.x.x.x/gateone/?ssh=ssh://'.$_SESSION['username'].'@' . $device['hostname'] . '"><i class="fa fa-lock fa-lg icon-theme" title="SSH to ' . $device['hostname'] . '"></i></a></div>

I was able to understand what the devices* files do but not html/includes/hostbox-menu.inc.php. Not sure where that is implemented. But i changed it anyway :smiley:

Of course this is a hacky way to do it but like @tslytsly had said, would be a cool addition.

I know there is a guacamole ticket out there too :wink:


EDIT* There is also a ticket for gateone!!

Good stuff davama,
I’ve had it working nice on my install for ages now.
The issue is that I can’t just add this as a PR like I have it, the user needs to be able to choose to enable or not.
So I need to work out how to add a simple config.php option that turns it on or off.


I worked out how to do it.

Why don’t you try this PR:


Will do