Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
omari is currently offline  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.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plugin/sqlite3 does not compile because of Link<> change
Next Topic: Copy the content of a SortedVectorMap
Goto Forum:
  


Current Time: Thu Jun 12 20:13:07 CEST 2025

Total time taken to generate the page: 0.05664 seconds