I build an Ubuntu Linux with two network interfaces connected to LAN and WAN (Internet). I have installed ssh-server using:

sudo apt-get install ssh openssh-server

Just notice that even external users can access the server thru ssh so I decided to secure it by allowing ssh access to listen ontly LAN and not to WAN interface.

How to do it? First edit sshd_config:

sudo nano /etc/ssh/sshd_config

The following config will appear:

/etc/ssh/sshd_config

# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

Insert the following line:

ListenAddress 192.168.1.1 (or your LAN ip address)

And restart ssh server service:

sudo /etc/init.d/ssh restart

Test if you can still access ssh from the internet.