EN | RU
How to use the service
Easiest method
Add this to your ~/.bashrc or ~/.zshrc:
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.nrtx.dev
}
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.nrtx.dev
}
and then run source ~/.bashrc or source ~/.zshrc.
Now you can forward your services like this:
http 80to forward a service on port:80with random subdomain. Service will be available at<something>.proxy.nrtx.dev.httpa domain 80to forward a service on port:80with subdomaindomain. Service will be available atdomain.proxy.nrtx.dev(if this domain is not taken yet).
All methods
- Forward service on port
:80with random subdomain:
$ ssh -p 2222 -R 80:localhost:80 ssh.nrtx.dev
- Forward service on port
:8080with custom subdomain:
$ ssh -p 2222 -R subdomain:80:localhost:80 ssh.nrtx.dev
- For Fedora you can add
-oHostKeyAlgorithms=+ssh-rsabeforessh -p 2222to prevent any problems with the key compatibility. - Function for
bash/zshto use as an alias (usage:http 80):
http () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R 80:localhost:"$1" ssh.nrtx.dev
}
- Same function but with custom subdomain (usage:
httpa subdomain 80):
httpa () {
ssh -p 2222 -oHostKeyAlgorithms=+ssh-rsa -R "$1":80:localhost:"$2" ssh.nrtx.dev
}