Difference between revisions of "Reverse SSH tunneling"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
  
 
1) Create tunnel
 
1) Create tunnel
   [[ssh -f]] [[-N]] [[ssh -T|-T]] [[-R]]22222:localhost:22 $([[hostname -I]])
+
   [[ssh -f]] [[-N]] [[ssh -T|-T]] [[-R]]2222:localhost:22 $([[hostname -I]])
  
   [[ssh -f]] [[-N]] [[ssh -T|-T]] [[-R]]22222:localhost:22 [[yourmachineip]].example.com or  
+
   [[ssh -f]] [[-N]] [[ssh -T|-T]] [[-R]]2222:localhost:22 [[yourmachineip]].example.com or  
  
 
   [[ssh -fNT]] -R2222:localhost:22 [email protected]
 
   [[ssh -fNT]] -R2222:localhost:22 [email protected]

Revision as of 11:02, 13 December 2023


1) Create tunnel

 ssh -f -N -T -R2222:localhost:22 $(hostname -I)
 ssh -f -N -T -R2222:localhost:22 yourmachineip.example.com or 
 ssh -fNT -R2222:localhost:22 [email protected]


  -T Disable pseudo-terminal allocation.


2) Connect

ssh -p 2222 localhost


Error

Bad remote forwarding specification

Solution: -R2222243653 review you do not exceed size of port.


kex_exchange_identification: read: Connection reset by peer

Activities

Related

See also

Advertising: