Open Ports & Installing SSH Open Ports & Installing SSH

June 15, 2021

debian

To connect my new Intel NUC computer to my laptop and android phone, I have used SSH with Filezilla as that is faster and easier than bluetooth and more ubiqitous. On my phone i have an app which i use to start and stop the ssh port connection. But not sure this is as easy on the Debian boxes, so...

Firstly, i wanted to check what ports were open on the machine. https://vitux.com/find-open-ports-on-debian/ gives a overview of the options, but installing nmap is my favourite tool for this and running this command gives the output of all open ports.

apt-get install nmap

nmap -p- 127.0.0.1

Nmap provides the name of the commonly used port as the 'service', port 22 is ssh and it wasnt installed.

Starting Nmap 7.70 ( https://nmap.org ) at 2021-06-15 09:18 BST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000058s latency).
Not shown: 65533 closed ports
PORT     STATE SERVICE
631/tcp  open  ipp
1716/tcp open  xmsg

Nmap done: 1 IP address (1 host up) scanned in 10.15 seconds

Installing SSH

Next, to install ssh I ran this command

sudo apt-get install openssh-server

then to check on the status

sudo systemctl status sshd

This allowed me to ssh into my machine and copy over a few files. Running the nmap command again and you can see it is now working.

Starting Nmap 7.70 ( https://nmap.org ) at 2021-06-15 09:35 BST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000031s latency).
Not shown: 65532 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
631/tcp  open  ipp
1716/tcp open  xmsg

Nmap done: 1 IP address (1 host up) scanned in 10.12 seconds

to enable / disable ssh i run these commands

systemctl enable ssh
systemctl disable ssh

Next, I will use Ansible to install Apache, PHP, Mysql/MariaDB and more tools ...


If you would like to contact me with this form on londinium.com, ilminster.net or via Twitter @andylondon