What is Port 22? (2024)

by Colin Cohen | Published on October 20, 2023

What is Port 22? (1)

Port 22 is dedicated to Secure Shell (SSH), which allows you to securely connect to a remote device and issue commands as if you were in front of it.

What is a Shell?

A shell is a program that lets you perform operating system commands on a device, typically through a command-line interface (CLI).

Understanding Secure Shell

SSH was developed to replace Telnet, which functions much like SSH but without providing a secure environment. SSH adds various features to overcome Telnet’s limitations by allowing you to connect securely to a remote device over an unsecured network.

To use SSH, enter the following command from a terminal or a command prompt:

ssh [username]@[host]

username is the username on the remote host that you want to logon as, and host is the hostname or IP address of the remote device.

Upon issuing the above command, the remote device will request your password and then authenticate you.

What is Port 22? (2)

Which Protocol Uses Port 22?

SSH protocol consists of three separate protocols, which include:

  • A transport layer protocol, which handles server authentication and data integrity

  • A user authentication protocol, which handles user authentication

  • A communication protocol, which manages encrypted tunneling

Port 22 vs Port 162

While port 22 is dedicated to connecting to remote devices using SSH, port 162 is used for sending logging and management data to remote monitoring applications using Simple Network Management Protocol (SNMP).

TCP Port 22 vs Port 443

You use port 22 for SSH to make secure connections to remote devices and run commands. You use port 443, on the other hand, for securely transmitting sensitive data such as credit card numbers in a web browser using Secure Socket Layer (SSL) over HTTPS.

You can also use port 443 for SSH tunneling if, for some reason, you cannot use port 22.

What is Port 22 Used For?

System administrators and others who need command-line access to remote devices use SSH over port 22 to manage these devices.

Port 22 Gives Secure Remote Access to Devices

You cannot always physically be at a device you need to manage. By using SSH over port 22, you can remotely access and control any device anywhere in the world as if it were your own device, and you can do this in a secure manner.

Who Needs Command-Line Remote Administration?

System administrators and similar professionals often have to manage devices located remotely, which could be at another location within the organization or in the cloud. These people will typically use command-line tools to do this, especially when managing devices running Unix-like operating systems such as Linux.

How Does TCP Port 22 Enable Secure File Transfer?

If you need to transfer files between devices securely, you can use SSH File Transfer Protocol (SFTP) over port 22. SFTP works much like FTP, only it does it far more securely.

RELATED: What Are TCP Ports and Why Are They Important?

Using the Default SSH Port

While the default port for SSH is 22, you can block it in your firewall and instead only allow SSH access through encrypted tunnels. You can also switch SSH to another port.

Creating Encrypted Tunnels with SSH Port 22

You can use encrypted tunnels with SSH if you need to use port forwarding to connect to an SSH server. This is useful, for example, if a firewall blocks the default SSH port 22.

VPN Solutions That Depend on Port 22

Many VPN solutions will block port 22. When this happens, you must use tunneling to connect to an SSH server, also known as port forwarding. With tunneling, you will use a different port for SSH, like a port that the VPN won’t block such as port 443.

How to Make Sure TCP Port 22 is Secure

Hackers often target port 22 because they could potentially do unlimited damage if they can log onto a remote device. Because of the risk, many organizations will turn off port 22 and instead use a random port for SSH, somewhere between 1024 and 65535.

Understanding how to keep port 22 secure is critical for keeping your networks safe from intruders. Here are a few ways to mitigate the risks of port 22.

1. Learn to Spot Misconfigurations and Weak Authentication

Often, default SSH server implementations will allow logins as the root user. Because root has unlimited control over the remote device, you should disable these types of logins.

Another common SSH-related misconfiguration is when you only want to allow SFTP without shell access. To properly do this, you must disable TTY access, as well as port forwarding and tunneling.

You also have to ensure that you set up security policies within your organization that prevent the use of weak credentials. There are several ways to make sure members of your organization are creating more secure passwords, and can help end users stay safe.

2. Block Vulnerable Ports Like Port 22 on Your Firewall

Because port 22 is so notorious for risks, many opt to block it from use altogether. Once you've enabled SSH tunneling, you can block port 22 in your firewall.

Examples of Port 22 Conflicts

Only one process can listen to port 22 (or any port, for that matter) at a particular time. If another process or server uses port 22, you must stop it before running your SSH server.

To determine if port 22 is available on your device, run the following command from your terminal:

netstat -aon

The output of this command will indicate if port 22 is available or in conflict with another process.

Can You Run an SSH Server and Web Server Simultaneously?

If, for some reason, you cannot run SSH over port 22 (if this port is blocked, for instance), you may be able to tunnel over TLS on port 443 using your web server.

Key Takeaways for Using Port 22

Port 22 is associated with the SSH (Secure Shell) protocol, which is used to securely connect to a remote device and issue commands just like you would on your own device. This default port does have its vulnerabilities, though: port 22 a popular target for brute force attacks and unauthorized access attempts. To keep port 22 more secure and ensure a more secure remote access experience, you should disable the root login, utilize strong passwords, and enable key-based authentication.

What is Port 22? (2024)

FAQs

What is Port 22? ›

Port 22 is associated with the SSH (Secure Shell) protocol, which is used to securely connect to a remote device and issue commands just like you would on your own device. This default port does have its vulnerabilities, though: port 22 a popular target for brute force attacks and unauthorized access attempts.

What is the use of port 22? ›

By default, port 22 is open on all IBM StoredIQ hosts. The port is used for Secure Shell (SSH) communication and allows remote administration access to the VM.

Why is port 22 vulnerable? ›

Port 22 is a TCP port, which can be exploited by attackers using brute force credentials or leaked SSH keys. Port 53 is a UDP and TCP port for queries and transfers vulnerable to DDoS attacks. This port is used to receive and send emails.

Is port 22 SSH or SFTP? ›

SFTP port number is the SSH port 22 (follow the link to see how it got that number). It is basically just an SSH server. Only once the user has logged in to the server using SSH can the SFTP protocol be initiated. There is no separate SFTP port exposed on servers.

Is SSH always on port 22? ›

Changing the SSH port in the server

By default, the SSH server still runs in port 22. However, there are occasions when it is run in a different port. Testing use is one reason. Running multiple configurations on the same host is another.

What port is SSH? ›

Port 22 is the designated port for SSH, allowing devices to establish secure connections for remote administration and file transfer. It's important to note that port 22 must be open and accessible on the network for SSH connections to be established.

What listens on port 22? ›

SSH servers listen for incoming connections on TCP port 22. Therefore, port 22 is subjected to unauthorized login attempts by hackers trying to access unsecured servers. To prevent unauthorized server assess, you can turn off port 22 and run the service on a random port between 1024 and 65535.

What is port 20022 used for? ›

FileWave IVS Ports
IVS (Imaging) PortsServiceDescription
20022SSLImaging Server to FileWave Server NATS
20443HTTPSIVS to Server: Inventory
20444HTTPSServer to IVS Client to IVS FileWave Anywhere interface (Appliance only)
20445HTTPSIVS to Server: Inventory
9 more rows

Is opening port 22 safe? ›

Hackers often target port 22 because they could potentially do unlimited damage if they can log onto a remote device. Because of the risk, many organizations will turn off port 22 and instead use a random port for SSH, somewhere between 1024 and 65535.

What port do hackers use? ›

Commonly hacked TCP port numbers include port 21 (FTP), port 22 (SSH), port 23 (Telnet), port 25 (Simple Mail Transfer Protocol or SMTP), port 110 (POP3), and port 443 (HTTP and Hypertext Transfer Protocol Secure or HTTPS).

Why should port 22 be closed? ›

Changing the TCP Port. Most automated robots try to log in to your SSH server on Port 22 as root with various brute force and dictionary combinations in order to gain access to your data. Furthermore, automated robots can put enormous loads on your server as they perform thousands of retries to break into your system.

Why do I need to change port 22? ›

By default, SSH runs on port 22, which is often targeted by brute force attacks. Changing the default SSH port can significantly enhance security by reducing the likelihood of automated attacks.

What does SFTP stand for? ›

SFTP, or Secure File Transfer Protocol, is a secure file transfer protocol that uses secure shell encryption to provide a high level of security for sending and receiving file transfers. SFTP is similar to FTPS in that it uses AES and other algorithms to secure data as it travels between different systems.

Can port 22 be used for FTP? ›

SFTP uses port number 22 by default, facilitating secure data movement over a single internet connection. This SFTP port assignment allows SFTP to offer enhanced security and simplicity compared to other protocols like FTP/S, which require multiple ports.

How do I know if port 22 is open for SSH? ›

How to check if port 22 is open in Linux
  1. Run the ss command and it will display output if port 22 opened: sudo ss -tulpn | grep :22.
  2. Another option is to use the netstat: sudo netstat -tulpn | grep :22.
  3. We can also use the lsof command to see if ssh port 22 status: sudo lsof -i:22.
Sep 21, 2020

What does SSH stand for? ›

SSH or Secure Shell is a network communication protocol that enables two computers to communicate (c.f http or hypertext transfer protocol, which is the protocol used to transfer hypertext such as web pages) and share data.

Is port 22 encrypted? ›

Port 22 refers to a networking port that is commonly associated with the Secure Shell (SSH) protocol. It serves as a channel for establishing secure and encrypted communication between a client and a server over an unsecured network.

What port is FTP? ›

FTP is an unusual service in that it utilizes two ports, a 'data' port and a 'command' port (also known as the control port). Traditionally these are port 21 for the command port and port 20 for the data port.

Is port 22 vulnerable? ›

An unauthenticated remote attacker with network access to port 22 can tunnel random TCP traffic to other hosts on the network via Ruckus devices. A remote attacker could exploit this vulnerability to bypass security restrictions and gain unauthorized access to the vulnerable application.

What runs on port 22? ›

Well-known ports
PortTCPDescription
21YesFile Transfer Protocol (FTP) control (command)
22YesSecure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding
23YesTelnet protocol—unencrypted text communications
25YesSimple Mail Transfer Protocol (SMTP), used for email routing between mail servers
127 more rows

What port is SSL? ›

So, what port does TLS/SSL use? The TLS/SSL port is 443, HTTPS, and employs TLS/SSL certificates to safeguard port communications. HTTP is the unsecure protocol port (port 80).

Why not use port 22? ›

Sometimes people don't want to use port 22 because when you open port 22 on any public IP, you'll get a few brute force SSH attacks per day. By changing the port, those attackers don't generally find the right port number to attack (though they still might).

How to start port 22? ›

  1. Step 1: Install OpenSSH Server on Windows. Enable OpenSSH Feature: Open the “Settings” app on your Windows machine. ...
  2. Step 2: Configure OpenSSH Server. Start SSH Service: ...
  3. Step 3: Allow SSH Through Windows Firewall. Allow SSH Service: ...
  4. Step 4: Accessing Windows SSH Server. Find Windows IP Address:
Apr 9, 2024

How do I close a 22 port? ›

You have to check 3 settings in order to close port 22.
  1. File Services > rsync : deselect Enable rsync service.
  2. File Services > FTP > SFTP : deselect Enable SFTP service.
  3. Terminal & SNMP > Terminal : deselect Enable SSH service.
Jul 29, 2019

What is the difference between port 22 and 23? ›

Port 22: Remote login protocol secure shell (SSH) Port 23: Telnet, used for accessing system remotely but is not very secure. Port 25: Simple Mail Transfer Protocol (SMTP) used by e-mail servers.

What program uses port 22? ›

Port 22 Details
Port(s)ProtocolService
22tcp,udpssh
22tcpAdoresshd
22tcpShaft
22udppcanywhere
14 more rows

Top Articles
Current Dryers Scrap Price - as of September 15, 2024
CSEA
5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
Craigslist Dog Sitter
ds. J.C. van Trigt - Lukas 23:42-43 - Preekaantekeningen
Cvs Devoted Catalog
True Statement About A Crown Dependency Crossword
Florida (FL) Powerball - Winning Numbers & Results
Used Wood Cook Stoves For Sale Craigslist
Nonuclub
Zürich Stadion Letzigrund detailed interactive seating plan with seat & row numbers | Sitzplan Saalplan with Sitzplatz & Reihen Nummerierung
Nebraska Furniture Tables
Classic Lotto Payout Calculator
Stihl Km 131 R Parts Diagram
Viha Email Login
Grayling Purnell Net Worth
Epguides Strange New Worlds
Skip The Games Fairbanks Alaska
Craigslist Pearl Ms
Joan M. Wallace - Baker Swan Funeral Home
Yosemite Sam Hood Ornament
Play It Again Sports Norman Photos
Avatar: The Way Of Water Showtimes Near Maya Pittsburg Cinemas
Craigslist Hunting Land For Lease In Ga
800-695-2780
UCLA Study Abroad | International Education Office
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
Wonder Film Wiki
Is Henry Dicarlo Leaving Ktla
How do you get noble pursuit?
Askhistorians Book List
Ringcentral Background
Desales Field Hockey Schedule
Moonrise Time Tonight Near Me
Smayperu
new haven free stuff - craigslist
Craigslist Lakeside Az
Skip The Games Grand Rapids Mi
Who Is Responsible for Writing Obituaries After Death? | Pottstown Funeral Home & Crematory
Foxxequeen
Pulaski County Ky Mugshots Busted Newspaper
Pink Runtz Strain, The Ultimate Guide
How Big Is 776 000 Acres On A Map
Bekkenpijn: oorzaken en symptomen van pijn in het bekken
Noga Funeral Home Obituaries
El Patron Menu Bardstown Ky
Goosetown Communications Guilford Ct
Houston Primary Care Byron Ga
Kenmore Coldspot Model 106 Light Bulb Replacement
Noelleleyva Leaks
Vrca File Converter
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 6697

Rating: 4.8 / 5 (68 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.