Answer the question
In order to leave comments, you need to log in
How to redirect ssh commands?
Hello, how to transfer ssh commands from one server to another?
There are 2 servers (let's say vps1 and vps2). It is necessary to make sure that the client connects via ssh to vps1, but all entered commands must be transferred and executed on vps2. At the same time, it is desirable, without visible changes for vps1. Roughly speaking, vps1 acts as a proxy, so to speak. Many thanks in advance for your answers :)
Answer the question
In order to leave comments, you need to log in
But it's in the mana! How do you use software without at least reading man ssh?
ssh -A vps1
ssh vps2
echo $HOSTNAME
You can forward a tunnel through ssh if port forwarding is enabled on vps1 (it is enabled by default)
ssh -f -N -L 22022:vps2:22 [email protected]
ssh -p 22022 [email protected]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question