I have already copied key to the ssh-keygen-copy-id-bat but it still does not work and I have to type in password every time i make ssh connection through visual code
why copy key script did not worked as described in tutorial
Best reply by nickH
Hi,
you probably don't have a key pair on your host PC, so the ssh-keygen-copy-id.bat script can't copy any public key to your App Build Environment. So you have to create the key pair on your host PC first.
- Go on your Windows PC to the location where the ssh-keys are stored. In my case its C:/Users/myuser/.ssh
- Open a terminal (Command Prompt) here.
- Generate a key pair with ssh-keygen -t rsa. (Don't modify the path and don't enter a passphrase)
ssh-keygen -t rsa
- After that you should be able to see the key pair on your PC (id_rsa = private key / id_rsa.pub = public key).
- You can run the ssh-keygen-copy-id.bat now to copy the public key to the App Build Environment.
If you want to learn more about the SSH public key authentication see: https://www.ssh.com/academy/ssh/public-key-authentication
Best regards,
Nick
1 reply