Im trying to make an ssh connection using the keytext instead of a keypath with no success.
Im saving the key text encrypted in database for mobility and security reasons but i am not able to inyect into ssh config to make the connection. All i get is "cannot connect to server".
I have tried also using the keytext hardcoded with no success.
I think there is no problem storing the key in the database and retrieving it later because if i save the retrieved key from database into a temp file in the storage and use the key path, i make a successfully connection.
and this:
'-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,069AEAFA71947BEDA3AAA1EC609D62B0
-----END RSA PRIVATE KEY-----'
is exactly what is stored in database (encrypted at store and decrypted when retrieved) and as i said, work if i save to temp file and use the key path.
Im trying to make an ssh connection using the keytext instead of a keypath with no success.
Im saving the key text encrypted in database for mobility and security reasons but i am not able to inyect into ssh config to make the connection. All i get is "cannot connect to server".
I have tried also using the keytext hardcoded with no success.
I think there is no problem storing the key in the database and retrieving it later because if i save the retrieved key from database into a temp file in the storage and use the key path, i make a successfully connection.
This works:
This doesnt work:
neither this work:
and this: '-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,069AEAFA71947BEDA3AAA1EC609D62B0
-----END RSA PRIVATE KEY-----'
is exactly what is stored in database (encrypted at store and decrypted when retrieved) and as i said, work if i save to temp file and use the key path.