Hacker News new | ask | show | jobs
by gvalkov 1332 days 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'
1 comments

Well normally you'd just use tee -a here except that's not whitelisted on the particular service you and I are using.