0

In the LAN we all access the server (Centos 7) using ssh but I was wondering how to enable ssh connections from outside the LAN, if a user wanted to use the Internet from their own Network to ssh into our LAN.

What would be the steps needed to make this possible?

2 Answers 2

0

As commented need to configure the router to access from outside to any service from any machine on the LAN.

In the router must specify the IP address of the computer on the LAN that are running the SSH service and generally the port on which the service is ejcuta (in this case 22). Depending on the router this is usually in "portforwarding" or "NAT".

On the other hand, on the computer where the service is running you need to keep active duty and accepting requests, this can be seen accessed with systemd service status:

systemctl status sshd

On the other hand you also have to see if the firewall of the computer running the service is active and if so, it is necessary to indicate that supports inbound connections to the SSH service. This we can manage with the command: firewalld-cmd.

2
  • this is nice and thorough, would you recommend changing the ssh port away from it's default 22 beforehand or is this unnecessary? Commented Oct 30, 2015 at 7:54
  • 1
    If you change it to a port outside the standard range, ie high port number, it will be more hidden. Personally, I like using the standard ports. If you plan to use the same computer to access the "SSH Server" you can deshabiliar authentication by username and password and use RSA _authentication system. Another security measure is to disable the _root login over SSH. Commented Oct 30, 2015 at 10:40
0

This is usually controlled by your network router. If ssh works on the LAN, then you just need to get into the router and tell it which ports from the outside should be forwarded to which machines and ports on the inside.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.