Nodejs example to create ssh port forwarding from local to remote
- you can ssh from local to the remote server
- local host should contain
~/.ssh/id_rsa
- local host should contain
- remote server should running a http example service
# start simple http server by Python 2 listen on port 9999
python2 -m SimpleHTTPServer 9999
# start simple http server by Python 3 listen on port 9999
python3 -m http.server 9999
Change variables in main.js
to fit your environment, then run on local machine:
npm install
node main.js
then open http://localhost:8000 in local browser.