May 2019
Intermediate to advanced
478 pages
11h 21m
English
Before continuing with this chapter, it is essential that you have the libssh library installed and available. Please refer to Appendix B, Setting Up Your C Compiler on Windows, Appendix C, Setting Up Your C Compiler on Linux, and Appendix D, Setting Up Your C Compiler on macOS, for libssh installation.
Our first program using libssh is designed to ensure that it's installed correctly. This program merely prints the libssh library version. The program is as follows:
/*ssh_version.c*/#include "chap11.h"int main(){ printf("libssh version: %s\n", ssh_version(0)); return 0;}
You can compile and run ssh_version.c with the following commands on Windows using MinGW:
gcc ssh_version.c -o ssh_version.exe -lsshssh_version
On Linux ...
Read now
Unlock full access