Private Key authentication
Posted: Thu 29 Nov 2007 10:28
Hello,
I would like to set up a connection with Private Key authentication.
I have a private key that looks very much like this below, and I'm able to connect to the server using putty and this key:
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20071127
Public-Lines: 4
AAAAB3NzaC1gdaEAAAALJQAUAIEAo6okxawnWoJWFd9QHd3yhhKd4KyFL9csQDqP
czBCPDlgHJUrXYa89XZ0pyZZ3RUCDtff7x1w+Z7ZCG0DyFuKxWt2gda3enFEz1aF
WGDiTuLHjPgHZIe441R4f4FZgDGBgqsRakdID+Ca1OZaVY8iaeC1E61mLsNs80uu
CqT2M4E=
Private-Lines: 8
AAAAgGW8ysAREYtKGpY+tiL/lsILkpKUwX6ag0qFRGoywWO09o5O45sAGxPvsEw6
bsZnAUd/RgsXfZRAJgtoFxuuhrET1uTi7pV877dhWfddi3wveTTr9GDLLLqZPwib
hekP4MGY1cMvMUQrjC3U4aX7Wq7+AQa8Hy/S/DaYRheaEhitAAsAQQDQxI7GI77I
vecY9e2cbuc2j/g6zFJYw8b3NIk1s8OrZRwIhGNN4dUHlqjdDUsfHb2wedtWrMyV
s8D8we5IAlaRAaAfQQDIsUsONVC-JqIg9MPJyriyisoVdqL+Sfr4gE4gi4hhb/XO
FDHaqLbsIkZ7GMI0tdqtgaW4GrCR11rv9HweCT7xAAAAQQCwTBA/2ghBbuYIqGVw
w8aR3lqtzRcr11qksFYQs5gFKT2EMrIbR3kDi0agkmpXOaoBs7/KlIPRFcYK4ERf
MfNu
Private-MAC: b1a03ff86c69da2ea9aa7ee3ff196a442b55d5c2
I'm creating an application that needs to connect using such private keys. The private keys are only known at runtime (So I can't import them in advance at design time). My question is, what is the correct method of using and/or importing these keys runtime in order to connect to the SSH Server with these keys?
I would like to set up a connection with Private Key authentication.
I have a private key that looks very much like this below, and I'm able to connect to the server using putty and this key:
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20071127
Public-Lines: 4
AAAAB3NzaC1gdaEAAAALJQAUAIEAo6okxawnWoJWFd9QHd3yhhKd4KyFL9csQDqP
czBCPDlgHJUrXYa89XZ0pyZZ3RUCDtff7x1w+Z7ZCG0DyFuKxWt2gda3enFEz1aF
WGDiTuLHjPgHZIe441R4f4FZgDGBgqsRakdID+Ca1OZaVY8iaeC1E61mLsNs80uu
CqT2M4E=
Private-Lines: 8
AAAAgGW8ysAREYtKGpY+tiL/lsILkpKUwX6ag0qFRGoywWO09o5O45sAGxPvsEw6
bsZnAUd/RgsXfZRAJgtoFxuuhrET1uTi7pV877dhWfddi3wveTTr9GDLLLqZPwib
hekP4MGY1cMvMUQrjC3U4aX7Wq7+AQa8Hy/S/DaYRheaEhitAAsAQQDQxI7GI77I
vecY9e2cbuc2j/g6zFJYw8b3NIk1s8OrZRwIhGNN4dUHlqjdDUsfHb2wedtWrMyV
s8D8we5IAlaRAaAfQQDIsUsONVC-JqIg9MPJyriyisoVdqL+Sfr4gE4gi4hhb/XO
FDHaqLbsIkZ7GMI0tdqtgaW4GrCR11rv9HweCT7xAAAAQQCwTBA/2ghBbuYIqGVw
w8aR3lqtzRcr11qksFYQs5gFKT2EMrIbR3kDi0agkmpXOaoBs7/KlIPRFcYK4ERf
MfNu
Private-MAC: b1a03ff86c69da2ea9aa7ee3ff196a442b55d5c2
I'm creating an application that needs to connect using such private keys. The private keys are only known at runtime (So I can't import them in advance at design time). My question is, what is the correct method of using and/or importing these keys runtime in order to connect to the SSH Server with these keys?