Contest permission denied for sharing public key while doing root ssh in ubuntu

Discussion in 'Big Data and Analytics' started by _35511, Oct 31, 2018.

  1. _35511

    _35511 New Member

    Joined:
    Jul 24, 2018
    Messages:
    1
    Likes Received:
    0
    Trying to copy ssh public key from one machine to aother machien. But permission denied.

    Steps done:-
    -> Given permission in sshd_config
    -> but still permission denied while trying to copy public key .

    can u anyone please suggest .

    thanks in Advance
     
    #1
  2. Neha_Pandey

    Neha_Pandey Well-Known Member
    Simplilearn Support Alumni

    Joined:
    Jun 7, 2018
    Messages:
    65
    Likes Received:
    0
    Hi Learner,

    Please try the below steps:-
    > Re-enable passwd authentication in /etc/ssh/sshd_config:
    -> PasswordAuthentication yes
    > Then restart the service:
    -> service sshd restart
    > Copy your public key:
    -> ssh-copy-id -i ~/.ssh/id_rsa.pub USER@HOST -p PORT
    Try to login again, no password should be required.

    Then disable password authentication.

    I hope this helps.
    Regards,
    Neha Pandey
     
    #2

Share This Page