1

I'm writing a program which needs to execute remote commands, and it would be very convenient to leverage the configurations which are already present on my machine. I.e. in my ~/.ssh/config file, I have servers declared like this:

Host my-server
    user my-user
    HostName 88.88.88.888
    port 3456
    IdentityFile ~/.ssh/my_id_rsa

Is there a way to leverage what already works, when for instance I type the command:

$ ssh my-server

from libssh so I don't have to re-invent the wheel and parse this config myself?

sak
  • 2,612
  • 24
  • 55

0 Answers0