ssh
adding keys
sudo apt-get install keychain
ssh-keygen -t ed25519 -C "stafford.williams@gmail.com"
linux:
echo "eval \`keychain --clear --eval id_ed25519\`" >> ~/.profile
cat ~/.ssh/id_ed25519.pub
macOS: see docs
removing known hosts
ssh-keygen -R THE_IP_ADDRESS_OR_URL
add new ssh key to linux vm
az vm extension set -n VMAccessForLinux --publisher Microsoft.OSTCExtensions --version 1.4 \
--vm-name vmName --resource-group resourceGroup \
--protected-settings '{"username":"user", "ssh_key":"ssh-rsa ..."}'
password-less login
ssh-copy-id -i ~/.ssh/id_rsa.pub user@host
configure windows ssh
- Set service
OpenSSH Authentication Agent
toAutomatic
andStart
it. - In Powershell,
ssh-add
- In environment variables, add
GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe