- Make sure you have the ssh-agent running,
eval "$(ssh-agent -s)" - Add the key to the agent
ssh-add ~/.ssh/<deploy_key> - Altenatively you can add the
GIT_SSH_COMMANDlikeGIT_SSH_COMMAND="ssh -i ~/.ssh/id_github_fmalassenet_grumpy" git pull - We can use the shortname,
Hostentry, in the~/.ssh/configfile to make it easier to use the key. heregithub-fjmalassis the shortname for the github account.
Host github-fjmalass
HostName github.com
User git
IdentityFile ~/.ssh/id_github_fjmalass
IdentitiesOnly yesMake sure that the .pem file is 600 mode.
ssh -i ~/.ssh/og_deploy_keys/fileserver_shared_keys.pem ubuntu@fileserver.operativegames.ai
ssh -i ~/.ssh/og_deploy_keys/fileserver_shared_keys.pem ubuntu@fileserver.operativegames.ai "ls -l <directory>
- Make it 600 level with a
Terminal (administrator mode)withArcheras user icacls <ssh-key> /grant <user>:(F)icacls <ssh-key> /grant SYSTEM:(F)
or more specifically
icacls "D:\DeployKeys\id_deploy_omnichannel-unreal-launcher-python" /inheritance:r
icacls "D:\DeployKeys\id_deploy_omnichannel-unreal-launcher-python" /grant Archer:(F)
icacls "D:\DeployKeys\id_deploy_omnichannel-unreal-launcher-python" /grant SYSTEM:(F)- Check the location of the (public) keys with
Get-Content C:\ProgramData\ssh\sshd_config | Select-String -Pattern "PubkeyAuthentication|AuthorizedKeysFile|PasswordAuthentication"- if the account (Archer) is administrator: place in
c:\ProgramData\ssh\sshd_configas we have
Match Group administrators
AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys- Place the
%USERPROFILE%\.sshthe private keys and theconfigfile - Set permissions
icacls <ssh_key> /inhertitance:r
icacls <ssh_key> /grand:r "%USERNAME%:(F)"
icacls <ssh_key> /grand:r SYSTEM:(F)"- As
Administrator- Install:
choco install openssh - Use
DISMdism /Online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0 - Configure
ssh-agent
- Install:
sc config ssh-agent start=auto
sc start ssh-agent- Assign key to agent:
ssh-agent %USER/.ssh/<ssh_key>, e.g.,ssh-agent USER - Add openssh to git
git config --global core.sshCommand c:/Windows/System32/OpenSSH/ssh.exe