Skip to content

Commit e6eca33

Browse files
spuiukanoopcs9
authored andcommitted
Add instruction on setting up ssh connections
Signed-off-by: Sachin Prabhu <[email protected]>
1 parent c5d986c commit e6eca33

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

docs/SSH-Configuration.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
##Instructions on setting up your ssh configuration to allow for easy access to the test machines.##
2+
3+
Ensure you have your public ssh key(an any other public keys) added to autorized_files and call the fix_ssh.yml ansible playbook using the command
4+
```
5+
make fix_ssh
6+
```
7+
in the admin directory.
8+
9+
The host machine which has the test vms have the following entries.
10+
```
11+
192.168.123.5 client1
12+
192.168.122.200 setup
13+
192.168.122.100 storage0
14+
192.168.122.101 storage1
15+
```
16+
17+
If accessing from the host machines, you can simply ssh into the machines as listed in the /etc/hosts.
18+
19+
However in my case, I run my test cluster on a remote test machine which can be accessed over ssh. To enable easy access from my local desktop, I have the following setup.
20+
21+
The /etc/hosts on the remote host machine is as follows
22+
```
23+
192.168.123.5 t-client1
24+
192.168.122.200 t-setup
25+
192.168.122.100 t-storage0
26+
192.168.122.101 t-storage1
27+
```
28+
Here an arbitrary string 't-' is prepended to the host names and its use will be evident shortly.
29+
30+
On my desktop, I have an entry for the remote host in /etc/hosts
31+
192.168.21.66 t
32+
33+
I also have the following ssh configuration appended to .ssh/config
34+
```
35+
Host t
36+
Hostname t
37+
KeepAlive yes
38+
ControlMaster yes
39+
ControlPath /tmp/t_ssh
40+
41+
Host t-*
42+
ProxyCommand ssh -S /tmp/t_ssh exec nc %h %p
43+
StrictHostKeyChecking no
44+
UpdateHostKeys yes
45+
```
46+
To initiate a ssh connection to the test machines on the remote host, I first connect to the remote host over ssh using hostname 't'. This opens a control path /tmp/t_ssh. Subsequently connections to test machines eg: t-storage0 uses this control path to open a ssh connection to storage0 on the remote host.

0 commit comments

Comments
 (0)