@@ -134,4 +134,44 @@ Last login: Sun Aug 16 17:01:52 2020 from ip-10-0-172-143.ap-southeast-1.compute
134134[ec2-user@ip-10-0-172-143 ~ ]$
135135[ec2-user@ip-10-0-172-143 ~ ]$ logout
136136Connection to 10.0.172.143 closed.
137+ ```
138+
139+ ### Use it as jumper
140+ > ` awssh ` command are using ssh natively from ssh binary itself, so any kind of manipulation as long as supported by the ssh is always possible.
141+
142+ You can combine ` awssh ` doing the ssh jumper with the help of ` ProxyCommand ` as follows:
143+ ``` bash
144+ $ ssh -i
~ /.ssh/id_rsa
[email protected] \
145+ -o ProxyCommand=' awssh i-0a706767b22c7ba15 --ssh-opts="-q -W %h:%p -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"'
146+ Warning: Permanently added ' 10.10.21.153' (ECDSA) to the list of known hosts.
147+ Last login: Mon Sep 7 05:24:52 2020 from ip-10-10-3-180.ap-southeast-1.compute.internal
148+ [centos@ip-10-10-21-153 ~ ]$
149+ Connection to 10.10.21.153 closed.
150+
151+ # Define the ssh_config
152+
153+ $ cat ~ /.ssh/config
154+ # Jumper Node
155+ Host 10.10.5.100
156+ ServerAliveInterval 60s
157+ StrictHostKeyChecking no
158+ UserKnownHostsFile /dev/null
159+
160+ # Target Node
161+ Host machineA
162+ HostName 10.10.21.153
163+ User centos
164+ Port 22
165+ IdentityFile ~ /.ssh/id_rsa
166+ StrictHostKeyChecking no
167+ UserKnownHostsFile /dev/null
168+ ServerAliveInterval 60s
169+ ProxyCommand awssh i-0a706767b22c7ba15 --ssh-opts=" -q -W %h:%p"
170+
171+ $ ssh machineA
172+ Warning: Permanently added ' 10.10.21.153' (ECDSA) to the list of known hosts.
173+ Last login: Mon Sep 7 05:24:52 2020 from ip-10-10-3-180.ap-southeast-1.compute.internal
174+ [centos@ip-10-10-21-153 ~ ]$
175+ Connection to 10.10.21.153 closed.
176+
137177```
0 commit comments