Multistage SSH's configuration.
ArcCosine
Posted on August 2, 2018
Multistage ssh
In some circumstances, it was necessary to use multistage SSH.
(It is bad that "ssh port 22 Operation timed out" comes out almost on AWS.)
Preparation
- Create server1's private key.
- Create server2's private key.
Update config
Edit ssh config file.
vim ~/.ssh/config
Add the following parameters.
Host preserver
HostName server2.com
ForwardAgent yes
User server2user-name
IdentityFile ~/.ssh/server2key
ProxyCommand ssh -l server1user-name -i ~/.ssh/server1key -p port-number server1.com -W %h:%p
Command
ssh-add ~/.ssh/server2key
ssh preserver
Enjoy!
đź’– đź’Ş đź™… đźš©
ArcCosine
Posted on August 2, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
kubernetes Setting Up a Production-Ready Kubernetes Cluster with RKE2 in vSphere Using Terraform
November 29, 2024