I am trying to make a ssh tunnel connection to a remote server that has different SSH port.
My PC
hostname: fooserver.com
IP address: 10.25.0.186
SSH port: 63354
My Remote PC
hostname: barserver.com
IP address: 10.26.0.183
SSH port: 63354
Now I want to connect in my Remote PC's MySQL server by using "localhost" by doing the SSH tunnel command below.
ssh -L 3306:localhost:3306 [email protected]
But after issuing the command above it show an error after few moments.
connect to host barserver.com port 22: Network is unreachable
It's very obvious that my PC tries to connect to SSH standard port but remote PC is running its SSH port to 63354. How can set the ssh port in the ssh tunnel command
I tried the following below.
ssh -L 3306:localhost:3306 [email protected]:63354
but it says its an invalid hostname.
ssh -L 3306:localhost:3306 -p 63354 [email protected]
.