How to setup SSH Key passwordless login in Red Hat Enterprise Linux

Solution Verified - Updated -

Issue

  • How to setup SSH password-less login
  • How do I setup SSH passwordless login
  • How to install SSH identity key onto a remote host on Red Hat Enterprise Linux
  • How to transfer files between servers without username/password.
  • Getting below error on ssh client side even after appending rss public key to remote server:

    Trying below from primary server after configuring rsa key:
    [user@ssh-client.example.com ~]$ ssh someuser@10.0.0.1
    Connection closed by 10.0.0.1
    
  • Getting below error on ssh server side in /var/log/secure:

    sshd[xxxx]: Authentication refused: bad ownership or modes for directory /home/XXX
    

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content