liftoff/GateOne — Issue #83: Per-Bookmark Additional SSH Options
Author: detain
Created: 2012-01-21 19:55:03+00:00
State: open

Ok, basically I'd like to be able to setup custom scripts or additional options per book mark. There doesnbt seem to be anything in the bookmarks for doing this, so I attempted to patch it in there. I was able to patch in an additional textarea box in the bookmark page and it stores it with the bookmarks.

Im stuck on getting it to add additional arguments to the options.command if there was stuff in the new bookmark field, im not really sure where its doing all that stuff.

```diff
if (url.slice(0,4) == "http" && url.indexOf('/', 7) == -1) {
@@ -1564,6 +1569,7 @@
'name': name,
'tags': tags,
'notes': notes,
+ 'options': options,
'visits': 0,
'updated': now.getTime(),
'created': now.getTime(),
@@ -1588,6 +1594,7 @@
b.bookmarks[i].url = url;
b.bookmarks[i].name = name;
b.bookmarks[i].notes = notes;
+ b.bookmarks[i].options = options;
b.bookmarks[i].tags = tags;
b.bookmarks[i].updated = now.getTime();
b.bookmarks[i].updateSequenceNum = 0;
@@ -1801,6 +1808,7 @@
'name': "You should not see this",
'tags': [],
'notes': "This should never be visible. If you see this, well, sigh.",
+ 'options': "",
'visits': 0,
'updated': new Date().getTime(),
'created': new Date().getTime(),
--- ./plugins/bookmarks/templates/bookmarks.html 2012-01-21 08:03:29.000000000 -0500
+++ /opt/gateone/./plugins/bookmarks/templates/bookmarks.html 2012-01-21 13:32:32.000000000 -0500
@@ -12,5 +12,8 @@
{% if bookmark['notes'] %}

{{escape(bookmark['notes'])}}
{% end %}
+ {% if bookmark['options'] %}
+
{{escape(bookmark['options'])}}
+ {% end %}
{% end %}

\ No newline at end of file
--- ./plugins/ssh/scripts/ssh_connect.py 2012-01-21 08:03:29.000000000 -0500
+++ /opt/gateone/./plugins/ssh/scripts/ssh_connect.py 2012-01-21 08:06:35.000000000 -0500
@@ -96,13 +96,13 @@
"-F/dev/null", # No config dir (might change this is the future)
# This is so people won't have to worry about user management when
# running one-Gate One-per-server...
- "-oNoHostAuthenticationForLocalhost=yes",
- "-oPreferredAuthentications=keyboard-interactive,password",
+ #"-oNoHostAuthenticationForLocalhost=yes",
+ #"-oPreferredAuthentications=keyboard-interactive,password",
"-p", port,
"-l", user,
]
- if sshfp:
- args.insert(3, "-oVerifyHostKeyDNS=yes")
+ #if sshfp:
+ # args.insert(3, "-oVerifyHostKeyDNS=yes")
if socket:
# Only set Master mode if we don't have a socket for this session.
# This allows us to duplicate a session without having to code
```