Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a deb repository accessible with ssh (following instructions from this site). I use the ssh-public-key-based authentication to access the repository server.

How I can configure apt-get on clients to make it use a private key to connect to the repo? How to configure apt-get to use ssh-agent?

Whenever I call sudo apt-get update on a client machine, I need to provide a password for vagrant user. The source.list on the client machines:

deb ssh://vagrant@ precise main


sudo ssh vagrant@

Works after following instructions on making sudo work with ssh-agent. sudo apt-get update does not.

share|improve this question

Works. I have removed the user from the deb repository definition in source.list:

deb ssh:// precise main

and I specify the IdentityFile in /home/root/.ssh/config as suggested in this post

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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