Quick hack to develop web2py on a different machine

For security reasons web2py will not allow you to log in as administrator unless you are logging in from the same workstation. (There are exceptions, but they are cumbersome: See the official book for full details.)

However, there is a quick hack that allows you develop from any machine: Just set up a ssh tunnel:

ssh username@ip_address_or_dns_name -L 8000: -N

As usually, I didn't come up with this myself. This time I found it here: http://www.revsys.com/writings/quicktips/ssh-tunnel.html

(However, if you read a few of the samples available on the internet, you'll see that may of them miss the point that in the local_port:ip_address:remote_port part you can and should use instead of the external ip address. The reason is that this is the address that the request seems to come from in the server program at the remote computer.)

1 comment: