The servers in the .6
subnet can not directly access the gerrit.gemteks.com
, except the HANA
server.
We can clone the git repository from the gerrit
into the HANA
server, but there is not enough space on that server.
The new server CYBERTRUNK
has a lot of space and we plan to use it to store the git repository.
In this senario, we could use the HANA
server as the jump host so that we could jump to accessGERRIT
.
After adding the SSH key of HANA
in the GERRIT
user setting, we could test it with the following command.
The DNS name gerrit.gemteks.com
cannot be resolved in the HANA
server, so we use the IP instead.
HANA
and CYBERTRUNK
We could add the pubkey of the CYBERTRUNK
to the authorized_keys
file in the HANA
server, so we could access the HANA
server without typing the password.
The J
option could be used to specify the jump host.
Now we could access the GERRIT
server from the CYBERTURNK
.
Before that, We also need to add the SSH key of CYBERTRUNK
in the GERRIT
like the HANA
.
In fact, it will use the CYBERTRUNK
SSH key to establish the connection with the GERRIT
.
We could use the SSH config to simplify every operation of accessing the server through ssh.
Once everything is set up, we can use the git
command to directly clone the repository from the GERRIT
on the CYPERTRUNK
server.