1

How can setup a remote ssh server for exposing my local website to the internet using my domain on aws by tunneling?

Like: By using serveo.net that can be done by running following command on my local machine:

ssh -R abc:80:localhost:80 serveo.net

then I can open my website using abc.serveo.net

I want to do the same for my aws website:mydomain.com then after running the following command on my local machine

ssh -R abc:80:localhost:80 mydomain.com(or anything similar)

I can access Apache on my local machine from abc.mydomain.com

(My isp didn't gave me a static ip and no port are open for internet connection on my local machine)

  • Your ISP did this on purpose. You cannot use a residential ISP account for business purposes. Try FTP'ing your local site to your AWS cloud... – eyoung100 Nov 17 '18 at 4:28
0

I don't know why you want to be able to access the pages by domain name after sshing to the server, but here is how to access a web service like apache, phpmyadmin or mysql over ssh.

You need to setup a dyndns or noip account or similar. Once you have a set domain name, set portforwarding on your router to send the ssh port to the computer you want to ssh into. Then you would ssh -R 80:localhost:8080 username@yourdomainname.com then set your browser to use SOCKS proxy and set the address to 127.0.0.1 and port to 8080. Browse to 127.0.0.1 or the ip address of the webserver on your home network most often 192.168.1.* and that should do it.

  • Thanks a lot.I wanted to access apache2. – Amiy Nov 17 '18 at 12:29
  • You're Welcome! @Amiy – Michael Prokopec Nov 22 '18 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.