Software Archive
Read-only legacy content
17061 Discussions

Login as root on mic0

Arne_S_
Beginner
1,127 Views

Hello,

I want to copy some .so files to /lib64 on mic0 via scp. However, I get an permission denied. When I try to login as root using ssh, after typing in my sudo password nothing happens.

I already tried the recommendations from this post https://software.intel.com/de-de/forums/intel-many-integrated-core/topic/394825 but it doesnÄt work.

I use Ubuntu 14.04. Everything works fine, except this.

Thanks!

Arne

0 Kudos
1 Solution
Vadim_K_Intel
Employee
1,127 Views

Hi Arne,

It looks like you don't have root ssh keys on mic installed properly.

There are two things you need to make sure you have on MIC:

  1. .ssh folder for root is copied from the host to the coprocessor
  2. and that root's ssh .pub key is added to authorized_keys file in .ssh folder (to allow passwordless access from the host)

I can explain how to do that, but let's try something else first. Can you ssh to mic0 as root?

user@localhost:> ssh root@mic0
root@mic0:>

Probably not. I just realized that on Ubuntu by default you have your root login disabled. And therefore, there might be no root's ssh files on your host system at all. If this is the case, you can enable root login with:

user@localhost:> sudo passwd root

generate ssh keys for root and add public key to the authorized keys file:

user@localhost:> sudo su
root@localhost:> ssh-keygen
...
root@localhost:> cat *.pub >> authorized_keys

And for the last part you will need to add root user on mic0 and restart mpss. It should be as easy as running micctrl --useradd root... Or just follow Kevin's recommendation:

Try stopping MPSS, issue micctrl --resetconfig (instead of micctrl --initdefaults) and then start MPSS. There's no need to re-gen the RSA pair before the --resetconfig unless you do not want to use the latest pair you just created.

After issuing --resetconfig you can also verify whether the RSA pair in root's home .ssh subdirectory match those under/opt/intel/mic/filesystem/mic0/root/.ssh

It is my understanding  --initdefaults creates the filesystem configuration if not present but it does not update contents you may have changed on the host when it is already present where --resetconfig updates existing configurations/files.

Once again, let me know if this will help. Good luck.

-Vadim

View solution in original post

0 Kudos
6 Replies
Vadim_K_Intel
Employee
1,127 Views

Hi Arne,

On your host system try to run scp command with sudo to grant root privileges to it:

user@localhost> sudo scp *.so mic0:/lib64/

Let me know if this works for you.

-Vadim

0 Kudos
Arne_S_
Beginner
1,127 Views

Hi Vadim!

No this doesn't work. First I am ask to insert my sudo pwd. Afterwards I am asked to insert it again. When I type in the same pwd I get no further message but again I have to type in my pwd.

 

Thanks!

Arne

0 Kudos
Vadim_K_Intel
Employee
1,128 Views

Hi Arne,

It looks like you don't have root ssh keys on mic installed properly.

There are two things you need to make sure you have on MIC:

  1. .ssh folder for root is copied from the host to the coprocessor
  2. and that root's ssh .pub key is added to authorized_keys file in .ssh folder (to allow passwordless access from the host)

I can explain how to do that, but let's try something else first. Can you ssh to mic0 as root?

user@localhost:> ssh root@mic0
root@mic0:>

Probably not. I just realized that on Ubuntu by default you have your root login disabled. And therefore, there might be no root's ssh files on your host system at all. If this is the case, you can enable root login with:

user@localhost:> sudo passwd root

generate ssh keys for root and add public key to the authorized keys file:

user@localhost:> sudo su
root@localhost:> ssh-keygen
...
root@localhost:> cat *.pub >> authorized_keys

And for the last part you will need to add root user on mic0 and restart mpss. It should be as easy as running micctrl --useradd root... Or just follow Kevin's recommendation:

Try stopping MPSS, issue micctrl --resetconfig (instead of micctrl --initdefaults) and then start MPSS. There's no need to re-gen the RSA pair before the --resetconfig unless you do not want to use the latest pair you just created.

After issuing --resetconfig you can also verify whether the RSA pair in root's home .ssh subdirectory match those under/opt/intel/mic/filesystem/mic0/root/.ssh

It is my understanding  --initdefaults creates the filesystem configuration if not present but it does not update contents you may have changed on the host when it is already present where --resetconfig updates existing configurations/files.

Once again, let me know if this will help. Good luck.

-Vadim

0 Kudos
Arne_S_
Beginner
1,127 Views

Hello Vadim,

now it works.

Bute: I had to delete the user "root" using

 

user@localhost:> sudo micctrl --deluser=root
user@localhost:> sudo micctrl --adduser=root
user@localhost:> sudo micctrl --passwd=root mic0

 

Using micctrl --resetconfig didn't work.

 

Thank you very much!

Arne

0 Kudos
Vadim_K_Intel
Employee
1,127 Views

I see. Well, I'm glad I could help.

-Vadim

0 Kudos
Srikanth_K_
Beginner
1,127 Views

HI Vadim,

This is the new post.

Here i am trying to make Xeon-Phi to act as a client and access another host Lustre Server -- MGS

On Xeon-Phi machine i have logged into mic0 and am not able to ping MGS Server.

 

Please help.

Regards,

Srikanth.K

 

0 Kudos
Reply