Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell SmartFabric OS10 User Guide Release 10.5.4

PDF

Configure Host-Based SSH Authentication

Authenticate a particular host. This method uses SSH version 2.

This example explains how to configure host-based SSH authentication without using password.

Configuration on the Linux client

  1. Install OpenSSH server on the Linux client. The following command is on Ubuntu; the command changes depending on the Linux platform.
    apt-get install openssh-server
  2. Create users (for example, test2, test3) using the following command with required default options:
    root@linux_client:/home# adduser test2
    root@linux_client:/home# adduser test3
  3. Populate the Linux client with the public keys of the server.
    root@linux_client:/etc/ssh# ssh-keyscan 100.10.10.10 | tee -a /etc/ssh/ssh_known_hosts
    100.10.10.10 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYYAAAAIbmlzdHAyNTYAAABBBJXPCX4Sr/TM+D+lRn7GRmn9lSIPnx/aJTOd9v7LZ9OeoyAs8agQedTmJiHVsuQqKVRWSj0jk4b+A0s0=
    100.10.10.10 ssh-rsa AAAAB3NzaC1yc2EAAAA7GzWn0DyavqrxtnRhuvaOrhKBW/r+X+g7hbx36VqrLIesvuaXBm69gU526HcPKmPMeBV8yZqviPoHMAodZE23m3EZe+Sx2l5PSphpIt4V5kfV6PjXY
    kxP/9T78iyTLdI4/VZR/z2uEK5m61q8tlMAfP2qMlDCQL3rQf+aYaZmorr8BsK2dJ8RmiDC1o0xvk4PyT0lcQtu0K3H5y93ddZgOVTxnerpVD6QmBSXJ/VztW3FYWGITUbQ6K1iUTg3G71/pPNE+Td+n4i+
    6rkSZOcKn+LCPDPiR+gkxF9uF1Jh/Npx1jh9fdEZzrvD4UL9Qd0o5o8SM9hc8wivbHuB/xtpBX5Nj3DHN0K3u7dXGHy4KX+Z3CaKFP+PkxImcEEWEhQbNsWgptj1gODGj0BOOnNQ03iD+Uts/FyS+oLOjYz
    pP1PH4fTRbmjATCS0YY3jCuqFqqb+CFpRl14ZiPSMKdEdbK+bHE7IHkH7Kl2dBv0coaM5hUaW8=
    100.10.10.10 ssh-ed25519 AAAAC3NzaC1lZDI1fUYVViGl4bjwf3qUqBqj/+QDJZsjicC3jr75ymvuo
    root@linux_client:/etc/ssh# more ssh_known_hosts
    100.10.10.10 ecdsa-sha2-nistp256 AAAAE2VjZhLXNoYTItmlzdHAyNTYAAABBBJXPCX4Sr/TM+D+lRn9GFEet47GRmn9lSIPnx/aJTOd9v7LZ9OeoyAs8agQedTmJiHVsuQqKVRWSj0jk4b+A0s0=
    100.10.10.10 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDp87GzWnrxtnRhuvaOrhKBW/r+X+g7hbx36VqrLIesvuaXBm69gU526HcPKmPMeBV8yZqviPoHMAodZE23m3EZe+Sx2l5PSphpIt4V5k
    6PjXYkxP/9T78iyTLdI4/VZR/z2uEK5m6fP2qMlDCQL3rQf+aYaZmorr8BsK2d
    J8Rmig8IRmK3+9WB3DC1o0xvk4PyT0lcQtu0K3HOVTxnerpVD6QmBSXJ/VztW3FYWGITUbQ6K1iUTg3G71/pPNE+Td+n4i+6rkSZOcKn+LCPDPiR+gkxF9uF1Jh/Npx1jh9fdEZzrvD4UL9Qd0o5o8SM9hc
    8wivbHuB/xtpBX5Nj3u7dXGHy4KX+Z3CaKFP+PkxImcEEWEhQbNsWgptj1gODGj0
    BOOnNQ03iD+Uts/FyS+oLOjYzpP1PH4fTRbmjATCS0YYqFqqb+CFpRl14ZiPSMKdEdbK+bHE7IHkH7Kl2dBv0coaM5hUaW8=
    100.10.10.10 ssh-ed25519 AAAAC3NzaC1lZDI1EfUYVViGl4bjwf3qUqBqj/+QDJZsjicC3jr75ymvuo
  4. Perform the following system-wide client configuration: Add below configurations in /etc/ssh/ssh_config.
    HostbasedAuthentication yes
    EnableSSHKeysign yes

Configuration on the OS10 switch

  1. Perform the following steps on the OS10 switch.
    1. Enter configuration mode.
      OS10# configure terminal
    2. Configure a username on the switch.
      OS10(config)# username test2 password testpassword2 role sysadmin priv-lvl 15
      OS10(config)# username test3 password testpassword3 role sysadmin priv-lvl 15
    3. Enable host-based authentication on the switch.
      OS10(config)# ip ssh server hostbased-authentication
    4. If you do not want to perform password authentication, run the following command.
      OS10(config)# no ip ssh server password-authentication
  2. Register the allowed client systems with the server.
    root@OS10:/etc/ssh# vi shosts.equiv 
    100.10.10.13
    
    root@OS10:/etc/ssh# cat shosts.equiv 
    100.10.10.13
  3. Populate the server with the public keys of the client.
    ssh-keyscan 100.10.10.13 | tee -a /etc/ssh/ssh_known_hosts
    
    root@OS10-8676:/etc/ssh# cat ssh_known_hosts
    100.10.10.13 ecdsa-sha2-nistp256 AAAAE2VjZHNhLYAAAAIbmlzdHAyNTYAAABBBODMU8YiNaDF65KNhQdIDODsvINS2Xn4JAol6zWWPQzS6hb4gTCibkN+H3syS9/D3m2s81+umxzvdlBhe0EisUE=
    100.10.10.13 ssh-rsa AAAAB3NqjYDIQtj+l9kjuweuk8fg2YuSN0ssfsC/vtctwdCITr5V/FVB5oOTcMwI+YcK0ECKr+Lq/UVSzNNjR+YpBNsbh7/KSy/nuf+laxT60fbki7/4TWw2HEd0Vui6w/z7jMWDDzqsWxCC6QuM6zGyucTfGHnQ6lwiY8sWguHmhnNV2hr38awHJhRKsCFfnY2H28x8oQNt0v9m7+fnw5wzdt+P7bcEyWw8keQK3xcqvAMq9H7sX
    100.10.10.13 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKn/cSPBVw+clF0rGp/W5bA3ZA4aHx
    100.10.10.13 ssh-rsa AAAAB3NzaC1yQC+HMZj+l9kjuweuee/MKQJfySCsfsC/vtctqwdCITr5V/FVB5oOTb+YcK0ECKr+Lq/UVSzO3YpBNsbh7/KSy/nuf+laxkXS60fbki7/4TWw2HEd0Vui6w/z7jMWDDzqsWxCC6QuM6zGefaTfGHnQ6lwiY8sWguHmhnNV2hr38awHJhRKsCFfnY2H28x8oQNt0v9m7+fnw5wzdt+P7bcEyWw8keQK3xcqvAMq9H7sX
    100.10.10.13 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTImlzdHAyNTYAAABBBODMU8YiNaDF65KNhQdIDODsvINS2Xn4JAol6zWWPQzS6hb4gTCibkN+H3syS9/D3m2s81+umxzvdlBhe0EisUE=
    100.10.10.13 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKn/cSPBVJEvTTYR67HUCDhw+clF0rGp/W5bA3ZA4aHx
  4. The users test2 and test3 must be able to log in without password. Log in to the Linux client with the credentials of the test2 user, which was created in the OS10 device.
    bash-3.2$ ssh test2@100.10.10.13
    Now, log in to OS10 device with the management IP address.
    test2@linux_client:~$ ssh 100.10.10.10

When you replace the switch, you need to perform this procedure again.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\