/usr/bin/ssh-copy-id: ERROR: No identities found [How to Solve]

Look at the problem first

ssh-keygen -t rsa
ssh-copy-id localhost
/usr/bin/ssh-copy-id: ERROR: No identities found

The RSA and rsa.pub files are generated normally, but the SSH copy ID cannot be reported:/usr/bin/SSH copy ID: error: no identities found

After a closer look, the file size is 0

[hadoop@hadoop102 .ssh]$ ll
sum 0
-rw-------. 1 hadoop hadoop 0 11月 21 21:30 authorized_keys
-rw-------. 1 hadoop hadoop 0 11月 21 21:34 id_rsa
-rw-r--r--. 1 hadoop hadoop 0 11月 21 21:34 id_rsa.pub

Look at the virtual machine disk. It has been used up

[root@hadoop102 ~]# df -lh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        15G   15G     0 100% /
tmpfs           2.9G     0  2.9G   0% /dev/shm
/dev/sda1        93M   38M   51M  44% /boot

To see what not to delete some files

[root@hadoop102 /]# du -sm * | sort -n
du: Cannot access "proc/129429/task/129429/fd/4": No such file or directory
du: Cannot access "proc/129429/task/129429/fdinfo/4": No such file or directory
du: Cannot access "proc/129429/fd/4": No such file or directory
du: Cannot access "proc/129429/fdinfo/4": No such file or directory
0	proc
0	selinux
0	sys
1	data
1	dev
1	home
1	lost+found
1	media
1	mnt
1	mynewdisk
1	srv
1	tmp
8	bin
16	sbin
28	lib64
30	etc
37	boot
78	app
132	root
206	lib
524	var
2241	usr
11255	opt

This is deleted

[root@hadoop102 module]# df -lh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        15G   14G  553M  97% /
tmpfs           2.9G     0  2.9G   0% /dev/shm
/dev/sda1        93M   38M   51M  44% /boot

Then generate the secret key, and then execute SSH copy ID.

Read More: