A password is not sent by the user, but the server does send a random string that is encrypted so only the user get prove they are the holder of the private key that corresponds to their copy of the public key inside servers copy of authorized_keys
prior. Getting your key into that file remotely the hard part..Ignore authorized_keys and known_hosts for now.
This way even if an eavesdropper peels backI don't think the SSL to see"pair of big primes" is in the raw chatpublic digest, they can't do a replay attack since it's more akin to a random string for each connectionhashed scramble, irreversible and asymmetric. - genius!
The symmetric key used for the connectionThe split you speak of is first encrypteddone with the remote sides publicprivate key. Each side says the highest level of symmetric (reversiblesomehow) key it supports: both my machines run CHACHA20 good for the keystrokes of ssh. An older machine might say AES256 or AES128. This is key that is more important to the data transfer, but it is ephemeral!
AsymmetricRSA is not used for symmetric decryption of your (ssh) state channel, new, ephemeral AES-128/AES-256 type keys are only used for login(actually Chacha now?), then switch to symmetric key for data transfermodern stream cyphers rolling one byte per time.
Modern setup sends Every new ssh connection probably has new ephemeral key ever hourstream cyphers generated, but it used to be every year back the old days.and long running sessions maybe shift keys each hour!
OnlyApart from the holder ofSSL wrapping the private RSA key can decryptentire connection, the ephemeral CHACHA20 key that I justkeys are sent to himsomehow using his RSAa blend of a portion of the (presumed) prime number that only a certain person could hold? Dunno how this part works, say your challenge is the number 2 and the public key 4162. So i need his public key first574257426 only the owner could deduce the ephemeral authenticate magic phrase maybe is 840840 because (420420 / 101) * 2 = 840840.
HereIt is a verbose connection macimmune to linux ona replay attack because a new challenge number or nonce is generated at the LAN with verbose outputserver side: lets say the new nonce is 3, your secret primes (oops, 420420 is not a prime my bad) will produce the answer 12487.722772277 that being 420420 / 101 but multiplied by 3 in this case, changing maybe called a nonce (nonsense).
The old RSA private key files are specially formatted. The two large primes are extracted from this file an agent on your machine similar to:
(base)openssl ➜rsa -noout ~-text ssh-inform PEM -vin marlene4096-id_rsa
OpenSSH_8.3p1, OpenSSLRSA 1.1.1gPrivate-Key: (4096 21bit, Apr2 2020primes)
debug1modulus:
Reading configuration data /Users/tom/.ssh/config
debug100: Connecting tof1:be:ce:47:2c:30:65:c0:94:9d:a6:b3:8e:21:
marlene [10.0.2.101] port 22.
...
here the server says what it supports - some modern elliptic curve post-Quantum one way asymmetric hashes: curve25519, ecdsa, and chacha20 I think for the symmetric key.
debug106: kex06: algorithm8f: curve25519-sha256
debug1c2: kexad: host key algorithm59: ecdsa-sha2-nistp256
Not quite sure what is above but below is the reversible encryption key declaration:
debug1d7: kexdd: server->client ciphere9: [email protected] MAC18: <implicit> compression41: none
debug16b: kex75:25:60:
client->server cipher: [email protected] MAC87:2b:87 <implicit>(greatly compression:shortened noneenormous string)
Aha - here the server expects that CHACHA key encrypted with a Elliptic Curve Diffie-Hellman reply. A snazzy blend of prime-number factors and post-quantum upgrade.
debug1publicExponent: expecting65537 SSH2_MSG_KEX_ECDH_REPLY(0x10001)
debug1privateExponent:
Server host key 2c:fe:9c:9a:36:a9:53:67:02:c2:4d:12:c2:73:a3:
ecdsa-sha2-nistp256 SHA256 1a:n2z1lvN........7vCrJA/a0xocsQ
debug1f6: Hostfe:b3:3a:db:de:07:65:f5:73:04:d7:f0:04:
'marlene' is known and83:01 matches(shortened thequite ECDSAlong hostenormous key.string)
debug1prime1:
Found key in /Users/tom/.ssh/known_hosts00:38
debug1f9: rekey4d:fb:6e:52:bd:ba:d7:0b:41:a3:94:b1:c6:
out after 134217728 blocks
...
i think here you can see it is up to the client to get up to date and generate Elliptic curve keys however. Here it looks like my machine is only seeing id_rsa in my .ssh folder. I guess this means I'd need to generate new elliptic curve keys if I want to be quantum-safe. MY BAD.
debug1a1:02:b7:27:38:0d:72:5c:d2:2e:5f:ce:e1:0d:88:
Will attempt key ae:c1 /Users/tom/.ssh/id_rsa(I RSAcan SHA256:u5+23F5a0tqlOk.....eElVw2stXvPhk+M7Msee <<----two Ion onlymy haveterminal RSAat keyonce)
debug1prime2:
Will attempt key: /Users/tom/.ssh/id_dsa
debug100:f8:3c:da:21:d8:ae:9d:93:47:d9:ee:3d:e9:6b:
Will attempt key: /Users/tom/.ssh/id_ecdsa
debug127:f9:0d:27:fe:4c:b0:66:9f:8b:9d:d6:cf:93:7f:
Will attempt key: /Users/tom/.ssh/id_ecdsa_sk
debug1b4:47 Will(I attemptcan key:see /Users/tom/.ssh/id_ed25519two <---on maybemy Iterminal shouldat keygen?once)
debug1exponent1:
Will attempt key: /Users/tom/.ssh/id_ed25519_sk
debug10c:af:ba:36:c0:01:25:ab:e1:c7:c2:52:43:c5:a7:
Will attempt key: /Users/tom/.ssh/id_xmss
debug140: SSH2_MSG_EXT_INFO received
debug12a: kex_input_ext_info1f: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>
debug1d5: SSH2_MSG_SERVICE_ACCEPT received
debug1cb:61:61:75:d4:a4:4d:7b:c8:5b:87:
Authentications that can continue:41 publickey
debug1:(not Nextsure authenticationwhy method:- publickey
debug1:these Offeringare publicalso key:bigger /Users/tom/.ssh/id_rsathan RSAmy SHA256:u5+23F5a0t........w2stXvPhk+M7Mprimes)
debug1exponent2: Server accepts
key: /Users/tom/.ssh/id_rsa RSA SHA25600:u5+23F5a0tq..........SdTZiuDegeElVw2stXvPhk+M7Mec:fb:fb:2b:30:d7:92:eb:96:3e:c1:a9:2d:7b:
Enter passphrase for key '/Users/tom/.ssh/id_rsa'c0:
I would need to have run ssh-keygen -t ed25519
to create that kind of curve and had it added.
If I had a id_ed25519 key I'd see:
debug1c3:8d:01:cf:4e:9b:61:7d:93:26:7e:7a:f0:cf:
Will attempt key 8b:e5 /Users/tom/.ssh/id_rsa(not RSAsure SHA256:u5+23F5a0...........eElVw2stXvPhk+M7M
debug1:why Will- attemptthese key:are /Users/tom/.ssh/id_dsa
debug1:also Willbigger attemptthan key:my /Users/tom/.ssh/id_ecdsaprimes)
debug1coefficient:
Will attempt key: /Users/tom/.ssh/id_ecdsa_sk
debug179:7a:00:14:81:9d:a8:ba:a9:2c:24:df:07:c4:2d:
Will attempt key a9:e3:63:bd:f0:5f:83:b2:b5:74:1b:4e:72:c9:5a:
/Users/tom/.ssh/id_ed25519 ED25519 SHA256:LI4VvDYy............OKEDfj1vgw <<-----
debug1:ff Will(not attemptsure key:why /Users/tom/.ssh/id_ed25519_sk
debug1:- Willthese attemptare key:also /Users/tom/.ssh/id_xmss
debug1:bigger SSH2_MSG_EXT_INFOthan receivedmy primes)