After a bit of research I found a product called GateOne that would enable me to use a web browser to connect to ssh using standard https – cool!
1 2 3 4 5 6 7 |
sudo apt-get install python-setuptools git clone https://github.com/liftoff/GateOne.git cd GateOne sudo python setup.py install cd .. sudo rm -rf GateOne sudo gateone |
Then ctrl+c so we can edit the config
1 |
sudo vi /etc/gateone/conf.d/10server.conf |
at the end of the line with origins, add the IP of the Pi, i.e. , “192.168.0.123” then restart the daemon:
1 |
sudo /etc/init.d/gateone restart |
to check it out browse to https://192.168.0.123/
All that remains is to ensure it starts automatically on reboot – I think the update-rc.d script must be a bit buggy on the Pi. I ended up doing all of this as I was having some trial and error fun:
1 2 3 4 |
sudo update-rc.d gateone defaults sudo update-rc.d gateone start 20 2 3 4 5 . stop 80 0 1 6 . cd /etc/rc2.d/ sudo mv K01gateone S01gateone |
Next up – some authentication …
within /etc/gateone/conf.d/20authentication.conf the authenication type was changed to google
1 |
"auth": "google", |
and the terminal configuration (/etc/gateone/conf.d/50terminal.conf) was modified to turn off the terminal for all users (allow: false) and then add it back on just for me:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
// This is Gate One's Terminal application settings file. { // "*" means "apply to all users" or "default" "*": { "terminal": { // These settings apply to the "terminal" application "commands": {"SSH": {"command": "/usr/local/lib/python2.7/dist-packages/gateone-1.2.0-py2.7.egg/gateone/applications/terminal/plugins/ssh/scripts/ssh_connect.py -S '%SESSION_DIR%/%SESSION%/%SHORT_SOCKET%' --sshfp -a 'oUserKnownHostsFile=\\\"%USERDIR%/%USER%/.ssh/known_hosts\\\"'", "description": "Connect to hosts via SSH."}}, "default_command": "SSH", "dtach": true, "enabled_filetypes": "all", "environment_vars": {"TERM": "xterm-256color"}, "session_logging": true, "syslog_session_logging": false, "allow": false } }, // "*" means "apply to all users" or "default" "user.upn=(my.email@gmail.com)": { "terminal": { // These settings apply to the "terminal" application "commands": {"SSH": {"command": "/usr/local/lib/python2.7/dist-packages/gateone-1.2.0-py2.7.egg/gateone/applications/terminal/plugins/ssh/scripts/ssh_connect.py -S '%SESSION_DIR%/%SESSION%/%SHORT_SOCKET%' --sshfp", "description": "Connect to hosts via SSH."}}, "default_command": "SSH", "dtach": true, "enabled_filetypes": "all", "environment_vars": {"TERM": "xterm-256color"}, "session_logging": true, "syslog_session_logging": false, "allow": true } } } |
Back in /etc/gateone/conf.d/10server.conf I added my external dns to the list of allowed origins and forwarded port 443 on my router to my Pi
Job done!