D
D
den199482018-08-13 16:14:24
linux
den19948, 2018-08-13 16:14:24

How to script connection of 2 servers via ssh?

Tell me please.
I create 2 cars as a vagrant. The task is for the script to generate ssh keys itself (I did this) and send them to the authorized_keys file. Sending to another machine is not a problem, scp will help. But I want it to be sent immediately without a password, because the script is not executed. Or how it is possible to bypass this situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-08-13
@den19948

Generate keys before creating two machines and implement immediately upon creation.
Or copy by password using some expect thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question