Below command is used to copy the key to single server.
# cat id_rsa.pub | ssh username@servername 'cat >> /home/user/.ssh/authorized_keys'
Below command is used to copy the key to multiple server. We can use for loop.
# for i in `cat serverlist`; do echo $i; cat id_rsa.pub | ssh username@servername 'cat >> /home/user/.ssh/authorized_keys'; done
Hope it helps.
# cat id_rsa.pub | ssh username@servername 'cat >> /home/user/.ssh/authorized_keys'
Below command is used to copy the key to multiple server. We can use for loop.
# for i in `cat serverlist`; do echo $i; cat id_rsa.pub | ssh username@servername 'cat >> /home/user/.ssh/authorized_keys'; done
Hope it helps.