Hi,
I want to move from password based authentication to key based authentication in SSH, and some questions arise.
I tested to generate a public and private keys in Windows, with cmd prompt and with puttygen.
I'm want to use a password for my public key (if this is important for my questions).
1. Why am I getting two different formats of the private key, does it matter which one i use?
Example of generated key in cmd prompt
(This one IS using my name at the end)
Generated in puttygen
(This one IS NOT using my name at the end)
2. When moving the key into
3. Can I use use password and key based authentication simultaneous when setting this up? I'm afraid to lock my self out.
4. Does SFTP work in SSH when disabling password authentication
Thank you,
I want to move from password based authentication to key based authentication in SSH, and some questions arise.
I tested to generate a public and private keys in Windows, with cmd prompt and with puttygen.
I'm want to use a password for my public key (if this is important for my questions).
1. Why am I getting two different formats of the private key, does it matter which one i use?
Example of generated key in cmd prompt
(This one IS using my name at the end)
Code:
ssh-rsa AAAAB3NzaC1yc2EAAAADddddsdfserDeqjjBgAXYrTGdqCj6HkgYI0C0437QFZxLfJv3f/9vM4Kla5CcalzQnkBp8CmV4lXXF++xz0IxdAE06GVmAAvZNFX2USSKb1WdK+8u0CJ7B4bJn598N3HfbBt15HtbuWGPz6nF7rtwk01kV2VDJgvpdWdD/wqasdfdffat2WMgWvTKbhWM99Wz10IHSASJDQoradlkZ0JePkvFhVStT2rPEvjyYwVfMVBk8ioQnLoiH0OKSnLzSEUasdafdsaadfw333QdXQLhur/fLEehA5byztJbUQrojgGe6+tOpEAOibNf0+xRQY8XYTNg42RhEmnkTEW97lXL35v84dTJ1kitMNHKBJaWzqVyLB3HLGG+ASDasdsvTvljo0i6Rpsj/gci0gzZJseI33mB1BGRFFra+jBGUaPUzdafVGTL3d2402u3xcjqqbOUQYaOhqwjG6nmH0PPQksAbOWz2z7dRoXCx04CxlhmpuzGX3LxNucNQGE= per andersson@PERANDERSSON
Generated in puttygen
(This one IS NOT using my name at the end)
Code:
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20210515"
AAAAB3NzaC1yc2EAAAABJQAAAQEA4ccdRMj8Kh1G7HRXeVf+/4pFNxnttvDsSi7A
UZJkOxgc3CApTpY+xaAAADEVrxMEXLUTOeyt59d9jWqyUKwlFBAlTMpVySuppx5f
LHRnZKFla3cjBnCnUsiLKg6s3asddfew34Lkj8wQIw9Zy8psHCmAmw0k/zWsgTty
myVeeC/pwz9zh4CIzUg7me4UYjWKWV16Y8+3HyyURy6ni88dAFzeT+SoAJ7pdO0+
9lXA//q23O5hq9D56ROU/19/hm7MBXqZ56xTt4+h+qVE3vTyzzi07xkgZtYXDweR
YuQ/C5wm/icMvWWRVg2BsAwrMEJ6pFMijApY5dssygZYdFutLw==
---- END SSH2 PUBLIC KEY ----
2. When moving the key into
~/.ssh/authorized_keys
- must the key string be on one single line without any line breaks or new lines?3. Can I use use password and key based authentication simultaneous when setting this up? I'm afraid to lock my self out.
4. Does SFTP work in SSH when disabling password authentication
ChallengeResponseAuthentication no
in sshd_config
?Thank you,