File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 123
123
[session]
124
124
(protocols/session session))
125
125
126
+ (defn session?
127
+ " Predicate to test for a session"
128
+ [x]
129
+ (satisfies? x protocols/Session))
130
+
126
131
; ;; Agent
127
132
(defn ssh-agent
128
133
" Create a ssh-agent. By default a system ssh-agent is preferred."
@@ -323,6 +328,16 @@ keys. All other option key pairs will be passed as SSH config options."
323
328
password
324
329
(session-options options)))
325
330
331
+ (defn ^String session-hostname
332
+ " Return the hostname for a session"
333
+ [^Session session]
334
+ (.getHost session))
335
+
336
+ (defn ^int session-port
337
+ " Return the port for a session"
338
+ [^Session session]
339
+ (.getPort session))
340
+
326
341
(defn forward-remote-port
327
342
" Start remote port forwarding"
328
343
([^Session session remote-port local-port ^String local-host]
You can’t perform that action at this time.
0 commit comments