LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-20-2020, 09:41 AM   #1
larzillo
LQ Newbie
 
Registered: Apr 2020
Posts: 1

Rep: Reputation: Disabled
Problem with SSH on Centos 8


I tried to access to my sever , but it refuse connection.
Can you help me to resolve this problem?

below there is the debug:

larzillo@Luigi-Notebook:~$ ssh -v root@172.18.2.254
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.18.2.254 [172.18.2.254] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/larzillo/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host
 
Old 04-20-2020, 09:45 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You've not supplied a password...or your server is not configured to allow root to ssh (as it should be)

Try with another user.
 
Old 04-21-2020, 03:35 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,992

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Wonder if Centos allows root ssh. For some reason I thought one had to use a lower level user and then use sudo or such????

Edit. Dohh. I just echoed scasey's post didn't I?

Last edited by jefro; 04-21-2020 at 05:18 PM.
 
Old 04-21-2020, 04:07 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,724

Rep: Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918Reputation: 5918
Yes, I have not installed version 8 yet but typically CentOS does enable ssh root login by default.

Could be due to several reasons. We don't have enough information as to if the OP changed anything from default.

The firewall although by default should allow ssh traffic on port 22.
hosts.deny or hosts.allow but by default should not be a factor.
Maybe a corrupted host key. Deleting ./ssh/known_hosts file may fix it. If you have more then one key in the file you might want to copy it although all it would do is ask to accept the key time you log into another server.
 
Old 06-26-2020, 10:51 PM   #5
diksha_rh
LQ Newbie
 
Registered: Jun 2020
Posts: 2

Rep: Reputation: Disabled
Hello,

Above output shows there is a problem with ssh_exchange_identification. It tries to read public key from another machine and it is not getting that public key. If you have access to another system try to execute below command:

# ls /etc/ssh/*

Output must show some key files. If file are present then we need to troubleshoot further or else we can try for reinstalling ssh package.

Awaiting for your response!!!

Have a nice day!!!

Thank you.
Diksha
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Disable or Enable SSH Root Login and Secure SSH Access in CentOS 7 LXer Syndicated Linux News 0 10-04-2018 05:10 PM
how to log ssh activity in /var/log/ssh/ssh*.log MrUmunhum Linux - Server 3 11-02-2011 02:25 AM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration