w*s 发帖数: 7227 | 1 e.g. 192.168.1.5,
192.168.1.6
both use port 22 for ssh client and server,
can this work ?
or i need to use different port for different pc ?
can ssh client server use the same port ?
many thanks ! |
a9 发帖数: 21638 | 2 用啥端口没关系吧。
【在 w*s 的大作中提到】 : e.g. 192.168.1.5, : 192.168.1.6 : both use port 22 for ssh client and server, : can this work ? : or i need to use different port for different pc ? : can ssh client server use the same port ? : many thanks !
|
w*s 发帖数: 7227 | 3 well, internally at home, 2 PCs have 2 ip address.
but when i ssh from outside, i only ssh into the external ip,
which is unique for both PCs
【在 a9 的大作中提到】 : 用啥端口没关系吧。
|
w****e 发帖数: 586 | 4 在router上设置port forwarding可以设的啊,比如把公共ip的50000端口指向第一台机
器的22,把公共ip的50001端口指向第二台机器的22
另外在推销一次ssh反向代理。。。
【在 w*s 的大作中提到】 : well, internally at home, 2 PCs have 2 ip address. : but when i ssh from outside, i only ssh into the external ip, : which is unique for both PCs
|
r***y 发帖数: 4379 | 5 楼上正解, port forwarding
【在 w*s 的大作中提到】 : well, internally at home, 2 PCs have 2 ip address. : but when i ssh from outside, i only ssh into the external ip, : which is unique for both PCs
|
w*s 发帖数: 7227 | 6 this is the part i lost,
"公共ip的50000端口",
is this port 50000 for ssh server or ssh client ?
thanks !
【在 w****e 的大作中提到】 : 在router上设置port forwarding可以设的啊,比如把公共ip的50000端口指向第一台机 : 器的22,把公共ip的50001端口指向第二台机器的22 : 另外在推销一次ssh反向代理。。。
|
a9 发帖数: 21638 | 7 ssh -p 50000 r**[email protected] 等于 ssh r**[email protected]
ssh -p 50001 r**[email protected] 等于 ssh r**[email protected]
台机
【在 w*s 的大作中提到】 : this is the part i lost, : "公共ip的50000端口", : is this port 50000 for ssh server or ssh client ? : thanks !
|
w*s 发帖数: 7227 | 8 make sense, thanks !
【在 a9 的大作中提到】 : ssh -p 50000 r**[email protected] 等于 ssh r**[email protected] : ssh -p 50001 r**[email protected] 等于 ssh r**[email protected] : : 台机
|