You can do the same with just some shell lines:
update: read also ssh-copy-id man page!$hosts ="host1 host2 host3" # use ssh-keyscan to populate your "known_hosts" file first: ssh-keyscan $hosts >>~/.ssh/known_hosts # then append your key on the remote hosts: for h in $hosts do echo "*** copying key to $h ***" cat ~/.ssh/id_rsa.pub | ssh $h 'cat >>~/.authorized_hosts' done
In reply to Re: Populating authorized_keys with Expect
by salva
in thread Populating authorized_keys with Expect
by cmv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |