[Discuss] hosts.equiv

Daniel Barrett dbarrett at blazemonger.com
Mon Jun 19 14:27:38 EDT 2023


On June 19, 2023, dan moylan wrote:
>On Mon, 19 Jun 2023 10:03:49 daniel barrett wrote:
>> Host funky
>>  Hostname albeberan
>>  User moylan
>>  IdentityFile ~/.ssh/rsync.key
>>  IdentitiesOnly yes
>>
>> Then run:
>>
>> $ rsync -r -e ssh /home/moylan/foo funky:
>
>not sure if i quite understand.  the remote host to which
>i'm trying to send the file is aldeberan.  i would think the
>command should be:
>
>  $ rsync -r -e ssh /home/moylan/foo aldeberan:
>
>who is funky?

"funky" is the arbitrary string defined on the first line of the config:

Host funky

The subsequent lines specify what "funky" means:

  Hostname albeberan
  User moylan
  IdentityFile ~/.ssh/rsync.key

So the command "ssh funky" connects to aldeberan with user moylan and
identify file ~/.ssh/rsync.key. It's like an alias for a remote host
that only ssh knows about and has custom SSH settings.

Looks like maybe you haven't used ~/.ssh/config before? You are in for
a treat! It's a great, time-saving SSH feature. "man 5 ssh_config" for
full details! :-)

--
Dan Barrett
dbarrett at blazemonger.com



More information about the Discuss mailing list