Linux restore default permission & paswordless SSH

  • Thread starter Cognos-Biginsight
  • Start date
C

Cognos-Biginsight

Guest
I am badly need experts help in Linux (RHEL 6.4). Please provide your valuable thoughts.

We are in the process of installing IBM software in Linux server(single node) using sudo root access UID. while installation it was asking enter sudo password less UID, After entering sudo UID installation failed. To make this password less IBM suggested to execute the command “ssh-copy-id -i /root/.ssh/id_rsa.pub adminid@FQDN“. Now if I enter this command “ ssh adminid@FQDN” it asks password, but it should not ask.

Clarification1: How can I make passwordless by executing above ssh-copy-id command.should i change anything in config or hosts file?

While troubleshoot this issue , we executed chmod 775 command. Since it is root UID it seems changed the permission for all ( may be) folders. Our techie conveyed as permission known for /etc/sshd directory only not others. So I may face warning or issue in future also.

Clarification2: How can I revert this chmod execution or any chance to restore default permission?
Note : No Backup has taken to restore VMimage and techie confirmed restoring the OS is the only option. But this will affect existing installed software.
 


IBM actually suggested that you setup ssh login using the root accounts public key?

You should login to the system, remove the contents of the .ssh directory, and use the ssh-copy-id command with a public key from the adminid account not the root account. That would be done with:
Code:
ssh adminid@FQDN rm -r ~/.ssh
Code:
ssh-keygen -t rsa
Code:
ssh adminid@FQDN mkdir -p ~/.ssh
Code:
ssh-copy-id /home/adminid/.ssh/id_rsa.pub adminid@FQDN

That should fix the ssh login. Then when you need to perform the installation:
Code:
sudo -s
will get you a root shell.
Or you can use this:
Code:
su
and then enter the root account password.
 

Staff online


Top