# SSH access for Git and Composer

Category: [Dedicated servers / VPS](https://www.cloudvip.com/en/faq/dedicated-servers-vps.md)
Source page: [https://www.cloudvip.com/en/faq/dedicated-servers-vps/ssh-access-for-git-and-composer](https://www.cloudvip.com/en/faq/dedicated-servers-vps/ssh-access-for-git-and-composer)
Keywords: ssh, git, composer

With hosting that includes an SSH account, you can manage your websites using Git and/or Composer.

If you need to connect to a private Git repository via SSH, or run composer require with authentication, you can create a local SSH key.

Connect via SSH using your Terminal and enter the following commands:

ssh-keygen

enter: /var/www/clients/client1/web2/home/[votre user ssh]/.ssh/id_rsa

Your private/public key pair is generated.

cat /var/www/clients/client1/web2/home/[votre user ssh]/.ssh/id_rsa.pub

Copy your public key and add it to your GitHub or GitLab account.

eval "$(ssh-agent)"

ssh-add /var/www/clients/client1/web2/home/[votre user ssh]/.ssh/id_rsa

Your private key has been added to the SSH agent
for this session
. You will therefore need to repeat this command next time.

You can now run git clone, git pull/push or composer update on a protected repository.
