N
N
nikitoshi2022-02-03 21:05:47
linux
nikitoshi, 2022-02-03 21:05:47

How to create a bash script that will connect to a server via SSH, and from it to another server?

We need a script that will connect to the server via SSH, and from it to another server via ssh. On the last one, you need to create . sh script file and execute it. Is this possible and how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2022-02-03
@nikitoshi

ssh -J [email protected] [email protected]
This is called connecting through a bastion host, sometimes also called Ssh jump proxy
I am writing from a mobile phone, google the details yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question