Quantcast
Channel: How can I set SSH connection to my server via just OPENVPN - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by llmora for How can I set SSH connection to my server via just OPENVPN

$
0
0

You can use the ListenAddress directive in /etc/ssh/sshd_config to force SSHD to only listen on a specific IP address, namely the OpenVPN private address of your server, e.g.:

ListenAddress 10.8.0.1

This prevents sshd from listening on any other interfaces, including the public ones (by default sshd listens on all the available interfaces). Just make sure you restart sshd after updating the configuration.

After that to connect to SSH you will need to first establish the OpenVPN connection and then ssh into 10.8.0.1.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>