ssh

adding keys

  1. Generate the key

    ssh-keygen -t rsa -b 4096 -C [email protected]

  2. Copy the key to clipboard

    clip < ~/.ssh/id_rsa.pub

  3. Start agent

    eval $(ssh-agent -s)

  4. Add key to agent ssh-add ~/.ssh/id_rsa

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 ..."}'