@@ -54,7 +54,7 @@ The `clj-ssh.ssh` namespace should be used for SSH from functional code.
54
54
55
55
```clj
56
56
(let [agent (ssh-agent {})]
57
- (let [session (session agent " localhost " {:strict-host-key-checking :no })]
57
+ (let [session (session agent " host-ip " {:strict-host-key-checking :no })]
58
58
(with-connection session
59
59
(let [result (ssh session {:in " echo hello" })]
60
60
(println (result :out )))
@@ -75,7 +75,7 @@ remote host using the credentials in your local ssh-agent:
75
75
76
76
```clj
77
77
(let [agent (ssh-agent {})]
78
- (let [session (session agent " localhost " {:strict-host-key-checking :no })]
78
+ (let [session (session agent " host-ip " {:strict-host-key-checking :no })]
79
79
(with-connection session
80
80
(let [result (ssh session {:in " ssh somehost ls" :agent-forwarding true })]
81
81
(println (result :out ))))))
@@ -87,7 +87,7 @@ system, then a local, isolated ssh-agent can be used.
87
87
```clj
88
88
(let [agent (ssh-agent {:use-system-ssh-agent false })]
89
89
(add-identity agent {:private-key-path " /user/name/.ssh/id_rsa" })
90
- (let [session (session agent " localhost " {:strict-host-key-checking :no })]
90
+ (let [session (session agent " host-ip " {:strict-host-key-checking :no })]
91
91
(with-connection session
92
92
(let [result (ssh session {:in " echo hello" })]
93
93
(println (result :out )))))
@@ -97,7 +97,7 @@ SFTP is supported:
97
97
98
98
```clj
99
99
(let [agent (ssh-agent {})]
100
- (let [session (session agent " localhost " {:strict-host-key-checking :no })]
100
+ (let [session (session agent " host-ip " {:strict-host-key-checking :no })]
101
101
(with-connection session
102
102
(let [channel (ssh-sftp session)]
103
103
(with-channel-connection channel
@@ -109,7 +109,7 @@ SSH tunneling is also supported:
109
109
110
110
```clj
111
111
(let [agent (ssh-agent {})]
112
- (let [session (session agent " localhost " {:strict-host-key-checking :no })]
112
+ (let [session (session agent " host-ip " {:strict-host-key-checking :no })]
113
113
(with-connection session
114
114
(with-local-port-forward [session 8080 80 ]
115
115
(comment do something with port 8080 here)))))
0 commit comments