Using ssh X11 tunnel through a bastion host to connect to a database server
Hi,
I succeeded running Oracle dbca, xclock & virt-viewer using Bastion over VPN (with root) 😊
Theoretical Steps:
First, connect to machine B and forward [localPort] to C:22 through BA$ ssh -L [localPort]:C:22 BNext, connect to C from A through this newly-created tunnel using [localPort], forwarding X11
A$ ssh -X -p [localPort] localhostNow we can run X11 programs on C and have them display on A
C$ xclock[localPort] can be any port that you are not already listening to on A, I often use 2222 for simplicity.
X11Forwarding should be enabled on server C
AllowTcpForwarding should be enabled on server B
Actual Steps
First, connect to machine B and forward [localPort] to C:22 through BA$ ssh -L [localPort]:C:22 BNext, connect to C from A through this newly-created tunnel using [localPort], forwarding X11
From A using putty to localhost using [localPort] enable X11 forwarding to localhost:0.0
Now we can run X11 programs on C and have them display on A
C using putty:
C$ export DISPLAY=127.0.0.1:10.0
C$ xclock
Comments
Post a Comment