Assuming you have

1. Linux box

2. Netapp box

You need to ssh to Netapp box without password, please follow the guide below , it is taken from Netapp site with the last steps they didn’t include which is to off and on “ssh2.enable” in order to reset the ssh2.

Setup SecureAdmin:

  1. Configure SecureAdmin to enable SSH2 to only accept defaults when it comes to selecting key size.
    Example:

    filer> secureadmin setup ssh

    SSH Setup
    ---------
    Determining if SSH Setup has already been done before...no

    SSH server supports both ssh1.x and ssh2.0 protocols.

    SSH server needs two RSA keys to support ssh1.x protocol. The host key is generated and saved to file /etc/sshd/ssh_host_key during setup. The server key is re-generated every hour when SSH server is running.

    SSH server needs a RSA host key and a DSA host key to support ssh2.0 protocol. The host keys are generated and saved to /etc/sshd/ssh_host_rsa_key and /etc/sshd/ssh_host_dsa_key files respectively during setup.

    SSH Setup prompts for the sizes of the host and server keys.
    For ssh1.0 protocol, key sizes must be between 384 and 2048 bits.
    For ssh2.0 protocol, key sizes must be between 768 and 2048 bits.
    The size of the host and server keys must differ by at least 128 bits.

    Please enter the size of host key for ssh1.x protocol [768] :
    Please enter the size of server key for ssh1.x protocol [512] :
    Please enter the size of host keys for ssh2.0 protocol [768] :

    You have specified these parameters:
    host key size = 768 bits
    server key size = 512 bits
    host key size for ssh2.0 protocol = 768 bits
    Is this correct? [yes]

  2. Setup will now generate the host keys in the background. This could take a few minutes to complete. After the setup is complete, start the SSH server using the ‘secureadmin enable ssh‘ command. A syslog message is generated when the setup is complete.
    filer> Wed Oct 25 05:59:56 GMT [rc:info]: SSH Setup: SSH Setup is done. Host keys are stored in /etc/sshd/ssh_host_key, /etc/sshd/ssh_host_rsa_key and /etc/sshd/ssh_host_dsa_key.

 

Linux:

  1. Configure and enable SSH on the Storage Controller as outlined in the Windows section above, steps 1 through 3.
  2. Test SSH access from the Linux client:
    linux> ssh root@filer ?
  3. From the Linux client, Generate the public/private key pair:
    linux> ssh-keygen -t rsa
  4. When asked for a ‘passpharse’, do not enter one.  Just press Enter twice.
  5. Mount the Storage Controller’s root volume to a temporary path on the linux client:
    linux> mount filer:/vol/vol0 /mnt/filer
  6. Create a folder on the storage controllers root volume: /etc/sshd/<username>/.ssh
    linux> mkdir -p /mnt/filer/etc/sshd/<username>/.ssh
    — Note: An error may be generated if this path already exists.  This can be safely ignored.
  7. Append the contents of the id_rsa.pub file to the 'authorized_keys' file:
    linux> cat ~/.ssh/id_rsa.pub >> /mnt/filer/etc/sshd/<username>/.ssh/authorized_keys
  8. Set the correct permissions on the .ssh folder and authorized_keys file:
    linux> chmod 700 /mnt/filer/etc/sshd/<username>/.ssh
    linux> chmod 600 /mnt/filer/etc/sshd/<username>/.ssh/authorized_keys
  9. filer>options ssh2.enable off
  10. filer>options ssh2.enable on
  11. Test that SSH to the Storage Controller does not prompt for a password:
    linux> ssh <user>@filer
    filer>
  12. Unmount the Storage Controller’s root volume:
    linux> cd ~
    linux> umount /mnt/filer