Changes

From Amahi Wiki
Jump to: navigation, search
126 bytes added ,  02:30, 17 November 2010
no edit summary
* On the running instance linux system edit file <code>/etc/ssh/sshd_config</code> and uncomment the <code>AllowTcpForwarding yes</code> and <code>GatewayPorts yes</code>
* On the NATted endpoint check that you have a server listening on LOCAL_PORT, you'll need to have the ssh key that's in the instance <code>~/.ssh/authorized_keys2</code> on this endpoint <code>~/.ssh/id_rsa.pub</code> for this to work this way, if this is not the case you can modify the command adding <code>USERNAME@INSTANCE_PUBLIC_IP</code>fire up a terminal and do:
<code>ssh -R INSTANCE_PUBLIC_IP:LOCAL_PORT:localhost:REMOTE_PORT INSTANCE_PUBLIC_IP</code>
 
you'll need to have the ssh key that's in the instance <code>~/.ssh/authorized_keys2</code> on this endpoint <code>~/.ssh/id_rsa.pub</code> for this to work this way, if this is not the case you can modify the command with <code>USERNAME@INSTANCE_PUBLIC_IP</code> instead of <code>INSTANCE_PUBLIC_IP</code>
Example:
<code>ssh -R 50.36.23.23:80:localhost:80 50.36.23.23</code>
and Now as long as the terminal on the NATted enpoint stays open if you point to http://50.36.23.23/ you're actually being replied by the server listening on the NATted IP.
5

edits