If you are trying to SSH on a remote server that is not running on the default port i.e. 22, you can connect to it by using the below syntax.
Syntax:
ssh user-name@server-name-or-ip -p <port-number>
Let's take a look at an example where we try to connect to port number 60 instead of 22.
Example:
% ssh admin@192.168.0.112 -p 60

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Linux,
- Rename a directory using Linux/Unix command
- ls command to list only directories
- How to Restart or Reload Nginx Server Service on Linux
- 3 ways to clear screen on Linux Terminal
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: sudo: unable to open Read-only file system
- Create Hidden File or Directory using Shell Command
- Command to know the installed Debian version?
- The Date Command and its usage [Linux - Unix - macOS]
- Fix - bash: man: command not found
- How to tar.gz a directory or folder Command
- How to Display content of a file in Terminal Screen?
- How to change bash terminal prompt string and color
- Sort ls command by last modified date and time
- Execute .bin and .run file Ubuntu Linux
- zsh hello world example
- How to check uptime of Linux/Unix/macOS system/server using console command?
- [Fix] Linux - bash: useradd: command not found
- Command to check Last Login or Reboot History of Users and TTYs
- How to install and Configure sar sysstat tools in Ubuntu Linux
- How to use SCP Command to Copy Directory
- Linux Remove or Delete Files and Directories using Terminal Commands
- How to connect to SSH port other than default 22
- Install OpenSSL on Linux/Ubuntu
More Posts:
- Turn Off Auto-Brightness on iPhone running iOS 16 - iOS
- Create a Zip file using Java Code programmatically - Java
- Cannot load PowerApps form in SharePoint Online due to repeated authentication - SharePoint
- 13.0 MacOS Ventura release date - MacOS
- Android R Cannot Be Resolved To A Variable - Android
- How to Install Python3 on Windows using PowerShell - Powershell
- How to count the files in a directory using Bash Command - Bash
- Exception in thread main java.lang.NoClassDefFoundError: package javaClass - Java