Q
Q
Quad_Tree2017-05-12 15:14:18
linux
Quad_Tree, 2017-05-12 15:14:18

How to use SSH without entering passphrase?

I set a task on Crontab so that it runs a certain script every day. This script has a command responsible for pushing commits to a remote bitbucket repository. The remote repository connected via SSH so as not to enter the password from the repository every time, but now it asks for passphrase every time. How can you get rid of this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2017-05-12
@Quad_Tree

Read about authorization by ssh keys.
Create a key pair (the $HOME/.ssh/id_rsa and $HOME/.ssh/id_rsa.pub files will appear
ssh-keygen
copy the public key to the remote server
ssh-copy-id [email protected] (for shell machines)
for bitbucket - in the web interface look in the profile where you can paste the public key - just copy the contents
of id_rsa.pub there

E
Erelecano Oioraen, 2017-05-12
@Erelecano

Use ssh-agent to store the key.
https://help.github.com/articles/working-with-ssh-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question