- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- PORT FORWARD SSH
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 08:12 AM
03-01-2007 08:12 AM
Server1
Port 2222
Server2
Port 22
How can I forward the Port 22 from Server to Port 2222 to Server1. I want also that the Server1 to use 2222 to interact with the Port 22 of Server2.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 08:28 AM
03-01-2007 08:28 AM
Re: PORT FORWARD SSH
On Server1
ssh -L2222:server1:22 server2 sleep 1000000
On Server2
ssh -L22:server1:2222 server2 sleep 1000000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 08:34 AM
03-01-2007 08:34 AM
Re: PORT FORWARD SSH
# Port forwarding
AllowTcpForwarding yes
# If port forwarding is enabled, specify if the server can bind to INADDR_ANY.
# This allows the local port forwarding to work when connections are received
# from any remote host.
GatewayPorts no
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2007 12:59 AM
03-02-2007 12:59 AM
SolutionIf a port is occupied by a process listening on it, you cannot re-use that port number.
When using the -L option the syntax is
-L
The
*From there* it is forwarded to
So, if you enter on server1 a command like:
ssh -L 2222:localhost:22 server2 sleep 1000000
it actually makes sense (the "localhost" is interpreted according to server2's point of view).
After this, if you connect to server1:22, you'll get server1 as normal. But if you connect to server1:2222, it will behave just as if you'd connected to server2:22.
However, unless you use the -g option, connections to server1:2222 will be refused unless they are originating from server1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2007 01:16 AM
03-02-2007 01:16 AM
Re: PORT FORWARD SSH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 05:05 AM
03-05-2007 05:05 AM
Re: PORT FORWARD SSH
Was this a trick question? :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 06:14 AM
03-05-2007 06:14 AM
Re: PORT FORWARD SSH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 06:16 AM
03-05-2007 06:16 AM