How to establish a simple ssh connection with c++

后端 未结 2 1440
粉色の甜心
粉色の甜心 2021-02-08 22:01

I am trying to make a c++ program which will connect to an ssh server (my laptop). The server is ok because I can get connected via putty. Although the program I wrote so far ca

2条回答
  •  暖寄归人
    2021-02-08 22:30

    Try to use different cipher. 3des-cbc is broken and probably disabled on your server already.

    There is really nice tutorial with simple session.

    Removing the line makes it working for me on Ubuntu (don't know where you found it):

    ssh_options_set(my_ssh_session, SSH_OPTIONS_CIPHERS_C_S,"aes128-ctr");
    

    If not, what version of libssh are you using? Isn't it some obsolete one?

提交回复
热议问题