Answer the question
In order to leave comments, you need to log in
How to form a sequence of bash commands in a sh file?
Good morning.
There is a need to send the "ssh-copy-id" command to a number of servers, and enter passwords. But it takes a long time to do it by hand.
I know ip, port, username and password.
How to make everything automatic in sh file?
(Some servers don't need to confirm " Are you sure you want to continue connecting (yes/no)? ", while others do)
# Это не сработало,
ssh-copy-id [email protected];
pass;
...
# И это не сработало
ssh-copy-id [email protected] && pass;
ssh-copy-id [email protected] && pass;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question