Skip to content

Commit b0776bc

Browse files
committed
Update README to use host-ip rather than localhost
1 parent 3fd49c3 commit b0776bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The `clj-ssh.ssh` namespace should be used for SSH from functional code.
5454

5555
```clj
5656
(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})]
5858
(with-connection session
5959
(let [result (ssh session {:in "echo hello"})]
6060
(println (result :out)))
@@ -75,7 +75,7 @@ remote host using the credentials in your local ssh-agent:
7575

7676
```clj
7777
(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})]
7979
(with-connection session
8080
(let [result (ssh session {:in "ssh somehost ls" :agent-forwarding true})]
8181
(println (result :out))))))
@@ -87,7 +87,7 @@ system, then a local, isolated ssh-agent can be used.
8787
```clj
8888
(let [agent (ssh-agent {:use-system-ssh-agent false})]
8989
(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})]
9191
(with-connection session
9292
(let [result (ssh session {:in "echo hello"})]
9393
(println (result :out)))))
@@ -97,7 +97,7 @@ SFTP is supported:
9797

9898
```clj
9999
(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})]
101101
(with-connection session
102102
(let [channel (ssh-sftp session)]
103103
(with-channel-connection channel
@@ -109,7 +109,7 @@ SSH tunneling is also supported:
109109

110110
```clj
111111
(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})]
113113
(with-connection session
114114
(with-local-port-forward [session 8080 80]
115115
(comment do something with port 8080 here)))))

0 commit comments

Comments
 (0)