How to create a .exe file using c/c++ for ssh login into remote server?

310 views Asked by At
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    system("ssh -i "privatekey" [email protected]");
    return 0;
}

I want to create a .exe file for easy and secure my ssh login in windows, I have used the above command it's saying:

'ssh' is not recognized as an internal or external command, operable program or batch file.

1

There are 1 answers

0
JB - MSI On

if you do not want to use SSH built into machine.. (or it is not available by the looks "'ssh' is not recognized") you can compile in libssh.

https://www.libssh.org/

https://api.libssh.org/stable/libssh_tutor_guided_tour.html there are examples of exactly what you want to do.