Cant SSH from Rocky OS -->LinuxMint. It works only vice verca

Bit-10101

Member
Joined
Nov 30, 2021
Messages
52
Reaction score
8
Credits
442
Master machine: Rocky 8.5
Targets: LinuxMint and RedHat machines

SSL certificarte
Created Linux SSL Key from Rocky machine and copied over to targets

Has also tested to transfer files from Rocky machine to LinuxMint Machine, no problem

But now I cant connect to LinuxMint (123.456.78.911) machine from Rocky machine (123.456.78.912) with:
ssh [email protected]
Error message: Permission denied, please try again

I can connect to LinuxMint localhost 127.0.0.1 with SSH


Log LinuxMint - auth.log 13:45
Feb 24 12:49:32 SV-LinuxMint sshd[32085]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=123.456.78.912 user=root Feb 24 12:49:34 SV-LinuxMint sshd[32085]: Failed password for root from 123.456.78.912 port 38182 ssh2

Syslog 13:48:
Error executing command as another user: Request dismissed

It´s not wrong password!

-Anyone who can explained what's really going on here?

-Really appreciate your answer.
 
Last edited:


Linux Mint probably ssh the root account disabled for ssh, you need to enable it.
Change the following:
Code:
#PermitRootLogin prohibit-password
To this:
Code:
PermitRootLogin yes
The restart sshd.
Code:
sudo systemctl restart sshd
Then you should be able to login is as root through ssh to your Mint system.
 
I´m sorry to say but I still get:
Permission denied, please try again
Rebooted LinuxMint machine, but still:
Permission denied, please try again
 
You are doing something wrong or forgot something then because I just tried the exact same thing on a Linux Mint system. I then sshed from Rocky Linux to the Linux Mint system with the root user and I was able to login.
 
I get around the problem with creating another user account than root.
The problem is, this user account must have the same permssions as root.
 
Last edited:
Can you share the output of the following?
Code:
grep PermitRootLogin /etc/ssh/sshd_config
 
You are doing something wrong or forgot something then because I just tried the exact same thing on a Linux Mint system. I then sshed from Rocky Linux to the Linux Mint system with the root user and I was able to login.
Everything is by default, except for this:
HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_ecdsa_key #HostKey /etc/ssh/ssh_host_ed25519_key # Ciphers and keying #RekeyLimit default none # Logging #SyslogFacility AUTH #LogLevel INFO # Authentication: #LoginGraceTime 2m PermitRootLogin yes #StrictModes yes #MaxAuthTries 6
 
That looks good, which Linux Mint version are you using that way I can test it out myself with that version?
 
That is the kernel version of the output you just shared, share the output of the following.
Code:
cat /etc/os-release
 
Linux Mint
Code:
root@lx-mint:~# grep ^PermitRootLogin /etc/ssh/sshd_config
PermitRootLogin yes
root@lx-mint:~# grep -i version /etc/os-release
VERSION="20.3 (Una)"
VERSION_ID="20.3"
VERSION_CODENAME=una
root@lx-mint:~# exit
logout
Rocky Linux
Code:
[root@lx-rocky ~]# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)

[root@lx-rocky ~]# ssh 11.22.13.13
[email protected]'s password:
Last login: Thu Feb 24 17:11:37 2022 from 11.22.13.12
root@lx-mint:~# whoami
root
root@lx-mint:~# grep -i version /etc/os-release
VERSION="20.3 (Una)"
VERSION_ID="20.3"
VERSION_CODENAME=una
 
Linux Mint
Code:
root@lx-mint:~# grep ^PermitRootLogin /etc/ssh/sshd_config
PermitRootLogin yes
root@lx-mint:~# grep -i version /etc/os-release
VERSION="20.3 (Una)"
VERSION_ID="20.3"
VERSION_CODENAME=una
root@lx-mint:~# exit
logout
Rocky Linux
Code:
[root@lx-rocky ~]# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)

[root@lx-rocky ~]# ssh 11.22.13.13
[email protected]'s password:
Last login: Thu Feb 24 17:11:37 2022 from 11.22.13.12
root@lx-mint:~# whoami
root
root@lx-mint:~# grep -i version /etc/os-release
VERSION="20.3 (Una)"
VERSION_ID="20.3"
VERSION_CODENAME=una
Rocky:
Rocky Linux 8.5 (Green Obsidian)"
LinuxMint:
VERSION="20.2 (Uma)"

LinuxMint version it´s the only parameter that differs?
 
The upgrade did the work!
Thanks
:)
The simple things! :) It's usually best to keep your system updated when, updating from one minor version to the next usually shouldn't be a problem. It's usually when upgrading from one major version to the next that you are more likely to run into issues although there can be exceptions and with updates things can break. In short to explain what is a Minor update and what is a major update.
Minor version update: 20.2 -> 20.3
Major version update 19.3 ->20.3
 

Members online


Top