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.
- Configure SecureAdmin to enable SSH2 to only accept defaults when it comes to selecting key size.
filer> secureadmin setup ssh
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  :
Please enter the size of server key for ssh1.x protocol  :
Please enter the size of host keys for ssh2.0 protocol  :
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]
- 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.
- Configure and enable SSH on the Storage Controller as outlined in the Windows section above, steps 1 through 3.
- Test SSH access from the Linux client:
- From the Linux client, Generate the public/private key pair:
linux> ssh-keygen -t rsa
- When asked for a ‘passpharse’, do not enter one. Just press Enter twice.
- Mount the Storage Controller’s root volume to a temporary path on the linux client:
linux> mount filer:/vol/vol0 /mnt/filer
- Create a folder on the storage controllers root volume:
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.
- 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
- 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
filer>options ssh2.enable off
filer>options ssh2.enable on
- Test that SSH to the Storage Controller does not prompt for a password:
linux> ssh <user>@filer
- Unmount the Storage Controller’s root volume:
linux> cd ~
linux> umount /mnt/filer