Connecting to MLNX-OS via SSH and public key authentication

I’m trying to connect to Mellanox SX6036 InfiniBand switches via SSH and public key authentication so that I don’t have to enter a password, but even after adding the public key of the host that initiates the ssh connection, I’m still asked to enter a password. I’ve added the public key via the following command:

ssh client user username authorized-key sshv2 AAAA…

When I check with show ssh client the correct key is shown but it looks like it is not used. Is there any way to debug this?
If relevant the switch I’m currently testing on is running Software Version: PPC_M460EX 3.6.8012 2019-02-22 07:53:42 ppc

Hi Michael,

Use

*(config)# ssh client user admin authorized-key sshv2 “key”

For example:

l-supp-SX6506 [standalone: master] (config) # ssh client user admin authorized-key sshv2 “ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2E3MMIbVu6vOmp8Sj+6AzKJlB/FgdT3IceDDnLWwbiZxrS0qRLwtyMw68yDm1caR8sDENna/xxcGBOsjRv25M5bAoNpauAiMWC9L/lypUxAbgerV0lc5SC1QsUfVTXvz5zPHSgAuhj7mk9+L4TXyIkEp16SHK8KRw2nZno5Z2YMFYn/a7/LSdRbXZLn4YBgjOdbEI9zUDKOJaqC8FMWzQ4ynyYr5wJ/CuGp2FwUIn2Jb+YyHKbF1h6S5yHAsVSzrgMOs+GcDBuXnjwHbGBu7uExUOKUcsgscFN+MO1B0HZZzNi/jQ+JWffN4JGX+9pqpx53H1u5iX11gj93O+I2JkQ== root@l-supp-05”

Use " show ssh client" to verify

Thanks a lot! Using the whole content of the public key file and enclosing it in double quotes and not just the key itself did the trick.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.