Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 12409  / 1 Year ago, fri, november 25, 2022, 12:58:59

Well im trying to connect to a client machine using ssh using this command




ssh root@ip-of-server




It immediately slaps me with this error



ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused



Then I tried to access a local server using same command it worked.



For further experiment I tried to do




ssh [email protected]




It displayed the same error



Whats wrong here. Any suggestion


More From » 12.04

 Answers
2

The remote server appears to operate on a different port than the default(22). You need to specify it using ssh user@host -p port syntax. It works locally since the port is the default, which is 22. The server and local server both require a package to provide SSH server, sshd or openssh. They can be installed with:



sudo apt-get install openssh-server


or



sudo apt-get install sshd

[#34483] Saturday, November 26, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fatuatexen

Total Points: 451
Total Questions: 107
Total Answers: 110

Location: Trinidad and Tobago
Member since Thu, Apr 27, 2023
1 Year ago
;