xxxxxxxxxx
async function generateKeyPair() {
return window.crypto.subtle.generateKey(
{
name: 'RSA-OAEP',
modulusLength: 2048, // 2048-bit key size
publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Public exponent (65537)
hash: 'SHA-256', // Hash algorithm
},
true, // Whether the key can be used for encryption
['encrypt', 'decrypt'] // Key usages
);
}
xxxxxxxxxx
ssh-copy-id -i ~/.ssh/id_rsa.pub YOUR_USER_NAME@IP_ADDRESS_OF_THE_SERVER