简体   繁体   中英

SSH port forwarding: bind: Address already in use

I have a remote server which I want to ssh it and forward my local port into it.

My application is hosting port 443 on my local machine. I'm connecting to the server with gcloud . This is the command:

gcloud compute --project "**^" ssh --zone "***" "***"

The target is to allow other to communicate, on port 9000, with the server and this traffic will redirected into my local machine, on port 443. On other words, accessing server on port 9000 is equal to access my computer on port 443.

So I do ssh port forwarding

gcloud compute --project "**^" ssh --zone "***" "***" -- -L 443:127.0.0.1:9000 -N

and get back this error:

bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 443
Could not request local forwarding.

What I'm doing wrong?

正确的选项是-R

... -R 9000:localhost:443

linux

if you have no other ssh connection you can fix it with:

killall ssh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM