Home » U++ Library support » U++ Core » HowTO use Core/SSH with PRIV/PUB Keys ?
HowTO use Core/SSH with PRIV/PUB Keys ? [message #60709] |
Fri, 26 July 2024 17:53  |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
I want to connect to server that accept only private key authentification.
I can connect using command line :
ssh -i ./id_rsa user@ServerIP
but with Core/SSH, i have tryed without success.
SshSession session;
String priv = "C:\Users\user\.ssh\id_rsa";
String pub = "C:\Users\user\.ssh\id_rsa.pub";
session.HostBasedAuth().Keys(priv, pub, "", true ).Connect("ssh://user@ServerIP");
session.GetErrorDesc() return "Invalid signature for supplied public key, or bad username/public key combination"
session.PublicKeyAuth().Keys(priv, pub, "", true ).Connect("ssh://user@ServerIP");
session.GetErrorDesc() return "Username/PublicKey combination invalid"
regards
omari.
|
|
|
Goto Forum:
Current Time: Thu Jun 12 20:13:07 CEST 2025
Total time taken to generate the page: 0.05664 seconds
|