drwx------. 2 root root 94 Nov 30 17:55 .ssh
and this are .ssh file permission.
drwx------. 2 root root 94 Nov 30 17:55 .
dr-xr-x—. 8 root root 4096 Dec 2 10:02 …
-rw-r–r–. 1 root root 421 Nov 30 15:04 config
-rw-------. 1 root root 2610 Nov 29 17:37 id_rsa
-rw-r–r–. 1 root root 580 Nov 29 17:37 id_rsa.pub
-rw-r–r–. 1 root root 3482 Nov 30 17:58 known_hosts
-rw-r–r–. 1 root root 3482 Nov 30 09:57 known_hosts.old
SSH connections working before you can use SSH for Ansible?
before i am using ssh username and password it was working.
If you want to use SSH public key authentication then you need to set it up, copy your local ~/.ssh/id_rsa.pub file to ~/.ssh/authorized_keys on the switch and make it 0600.