Currently my host machine has a private key but I would like to develop on a remote machine via ssh, so I need to clone from a private git repository from that remote machine.

Is there a way to give temporary privileges to the machine that I am ssh'ing into so that I can clone from that machine?

Of course there are solutions like generating a private key for the remote machine, or copying over the files via ssh. Just wondering if there is a simple alternative.

Thanks in advance.

1 Answer 1


Yes, there is, you can forward your keys without copying them. Instead of ssh user@server you use ssh -A user@server. When you are logged to the remote machine you can check what keys you can use by ssh-add -l.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.