liftoff / GateOne

Gate One is an HTML5-powered terminal emulator and SSH client
http://liftoffsoftware.com/Products/GateOne
Other
6.28k stars 925 forks source link

Request - Allow change of default host #94

Closed shinji257 closed 12 years ago

shinji257 commented 12 years ago

When authenticated the default host of the session is localhost. Can we get an option to customize it to point somewhere else or even to leave it blank? If it is blank it would require it to be populated by simply looping back to the prompt when it is empty.

liftoff commented 12 years ago

This is a great idea! You can expect this feature in the next commit.

liftoff commented 12 years ago

I just pushed a commit that adds this feature. To enable it you just need to add "--default_host='yourhostname'" to the 'command' in your server.conf:

command = "/opt/gateone/plugins/ssh/scripts/ssh_connect.py --default_host='somehost' --logo -S '/tmp/gateone/%SESSION%/%SHORT_SOCKET%' --sshfp -a '-oUserKnownHostsFile=%USERDIR%/%USER%/ssh/known_hosts'"

That will make the prompt look like so:

[Press Shift-F1 for help]                                                                                                                                                                                                                

Host/IP or SSH URL [somehost]:

If you want to disable the default host altogether just set default_host equal to an empty string like so:

command = "/opt/gateone/plugins/ssh/scripts/ssh_connect.py --default_host='' --logo -S '/tmp/gateone/%SESSION%/%SHORT_SOCKET%' --sshfp -a '-oUserKnownHostsFile=%USERDIR%/%USER%/ssh/known_hosts'"

Give it a try and let me know how it goes. Thanks!

shinji257 commented 12 years ago

That seems to work great. I set it to not have a default host and it omitted it as expected and also errored indicating it needed a valid one which was also what I wanted. Thanks!

liftoff commented 12 years ago

Great! I'm going to close out this issue then. Please open more tickets for more features like this! I love the easy ones :)