3 ms·
One nice use of dd is to append an ssh key to .authorized_keys on a host that doesn't allow shell or sftp access (which is what ssh-copy-id needs): cat id_rs
by gvalkov 4y ago
One nice use of dd is to append an ssh key to .authorized_keys on a host that doesn't allow shell or sftp access (which is what ssh-copy-id needs):
cat id_rsa.pub | ssh $host 'dd of=.ssh/authorized_keys oflag=append conv=notrunc'
- formerly_proven 4y agoWell normally you'd just use tee -a here except that's not whitelisted on the particular service you and I are using.