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.
Try ssh -L 3306:localhost:3306 -p 63354 [email protected]
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다