Establishing a connection

Now that we've ensured that libssh is correctly installed, it's time to attempt an actual SSH connection.

You'll need to have access to an SSH server before continuing. OpenSSH is a popular server that is available for Linux, macOS, and Windows 10. It works well for testing but be sure to understand the security implementations before installing it on your device. Refer to your operating system's documentation for more information.

If you would rather test with a remote system, Linux Virtual Private Servers (VPS) running OpenSSH are available from many providers. They typically cost only a few dollars a month.

Let's continue by implementing a program that uses libssh to open an SSH connection.

We structure the rest ...

Get Hands-On Network Programming with C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.