├── .appveyor.yml ├── .circleci └── config.yml ├── .gitattributes ├── .github ├── CODEOWNERS ├── CONTRIBUTING.rst ├── code_of_conduct.md ├── issue_template.md └── workflows │ └── lock-threads.yml ├── .gitignore ├── .readthedocs.yml ├── COPYING ├── Changelog.rst ├── LICENSE ├── MANIFEST.in ├── README.rst ├── _setup_libssh2.py ├── ci ├── appveyor │ ├── build_package.bat │ ├── build_ssh2.bat │ ├── build_zlib.bat │ ├── fix_version.py │ └── pypi_upload.py ├── build-manylinux.sh ├── build-wheels.sh ├── docker │ └── manylinux │ │ ├── Dockerfile.2014_x86_64 │ │ └── Dockerfile.aarch64 ├── integration_tests │ ├── __init__.py │ ├── base_test.py │ ├── embedded_server │ │ ├── __init__.py │ │ ├── authorized_keys │ │ ├── ca_host_key │ │ ├── known_hosts │ │ ├── openssh.py │ │ ├── rsa.key │ │ └── sshd_config.tmpl │ ├── test_agent.py │ ├── test_channel.py │ ├── test_knownhost.py │ ├── test_session.py │ ├── test_sftp.py │ ├── unit_test_key │ └── unit_test_key.pub └── osx-wheel.sh ├── doc ├── Changelog.rst ├── Makefile ├── agent.rst ├── api.rst ├── channel.rst ├── conf.py ├── exceptions.rst ├── fileinfo.rst ├── index.rst ├── installation.rst ├── introduction.rst ├── knownhost.rst ├── listener.rst ├── pkey.rst ├── requirements.txt ├── session.rst ├── sftp.rst ├── sftp_handle.rst ├── statinfo.rst └── utils.rst ├── examples ├── README.rst ├── agent_auth.py ├── example_echo.py ├── example_host_key_verification.py ├── nonblocking_execute.py ├── nonblocking_sftp_read.py ├── nonblocking_sftp_readdir.py ├── paramiko_echo.py ├── password_auth.py ├── publickey_fromfile.py ├── scp_write.py ├── sftp_read.py └── sftp_write.py ├── libssh2 ├── CMakeLists.txt ├── COPYING ├── ChangeLog ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── README.md ├── RELEASE-NOTES ├── acinclude.m4 ├── aclocal.m4 ├── cmake │ ├── CheckFunctionExistsMayNeedLibrary.cmake │ ├── CheckNonblockingSocketSupport.cmake │ ├── CopyRuntimeDependencies.cmake │ ├── FindLibgcrypt.cmake │ ├── FindMbedTLS.cmake │ ├── FindWolfSSL.cmake │ ├── PickyWarnings.cmake │ └── libssh2-config.cmake.in ├── compile ├── config.guess ├── config.rpath ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── docs │ ├── AUTHORS │ ├── BINDINGS.md │ ├── CMakeLists.txt │ ├── HACKING-CRYPTO │ ├── HACKING.md │ ├── INSTALL_AUTOTOOLS │ ├── INSTALL_CMAKE.md │ ├── Makefile.am │ ├── Makefile.in │ ├── SECURITY.md │ ├── TODO │ ├── libssh2_agent_connect.3 │ ├── libssh2_agent_disconnect.3 │ ├── libssh2_agent_free.3 │ ├── libssh2_agent_get_identity.3 │ ├── libssh2_agent_get_identity_path.3 │ ├── libssh2_agent_init.3 │ ├── libssh2_agent_list_identities.3 │ ├── libssh2_agent_set_identity_path.3 │ ├── libssh2_agent_sign.3 │ ├── libssh2_agent_userauth.3 │ ├── libssh2_banner_set.3 │ ├── libssh2_base64_decode.3 │ ├── libssh2_channel_close.3 │ ├── libssh2_channel_direct_streamlocal_ex.3 │ ├── libssh2_channel_direct_tcpip.3 │ ├── libssh2_channel_direct_tcpip_ex.3 │ ├── libssh2_channel_eof.3 │ ├── libssh2_channel_exec.3 │ ├── libssh2_channel_flush.3 │ ├── libssh2_channel_flush_ex.3 │ ├── libssh2_channel_flush_stderr.3 │ ├── libssh2_channel_forward_accept.3 │ ├── libssh2_channel_forward_cancel.3 │ ├── libssh2_channel_forward_listen.3 │ ├── libssh2_channel_forward_listen_ex.3 │ ├── libssh2_channel_free.3 │ ├── libssh2_channel_get_exit_signal.3 │ ├── libssh2_channel_get_exit_status.3 │ ├── libssh2_channel_handle_extended_data.3 │ ├── libssh2_channel_handle_extended_data2.3 │ ├── libssh2_channel_ignore_extended_data.3 │ ├── libssh2_channel_open_ex.3 │ ├── libssh2_channel_open_session.3 │ ├── libssh2_channel_process_startup.3 │ ├── libssh2_channel_read.3 │ ├── libssh2_channel_read_ex.3 │ ├── libssh2_channel_read_stderr.3 │ ├── libssh2_channel_receive_window_adjust.3 │ ├── libssh2_channel_receive_window_adjust2.3 │ ├── libssh2_channel_request_auth_agent.3 │ ├── libssh2_channel_request_pty.3 │ ├── libssh2_channel_request_pty_ex.3 │ ├── libssh2_channel_request_pty_size.3 │ ├── libssh2_channel_request_pty_size_ex.3 │ ├── libssh2_channel_send_eof.3 │ ├── libssh2_channel_set_blocking.3 │ ├── libssh2_channel_setenv.3 │ ├── libssh2_channel_setenv_ex.3 │ ├── libssh2_channel_shell.3 │ ├── libssh2_channel_signal_ex.3 │ ├── libssh2_channel_subsystem.3 │ ├── libssh2_channel_wait_closed.3 │ ├── libssh2_channel_wait_eof.3 │ ├── libssh2_channel_window_read.3 │ ├── libssh2_channel_window_read_ex.3 │ ├── libssh2_channel_window_write.3 │ ├── libssh2_channel_window_write_ex.3 │ ├── libssh2_channel_write.3 │ ├── libssh2_channel_write_ex.3 │ ├── libssh2_channel_write_stderr.3 │ ├── libssh2_channel_x11_req.3 │ ├── libssh2_channel_x11_req_ex.3 │ ├── libssh2_crypto_engine.3 │ ├── libssh2_exit.3 │ ├── libssh2_free.3 │ ├── libssh2_hostkey_hash.3 │ ├── libssh2_init.3 │ ├── libssh2_keepalive_config.3 │ ├── libssh2_keepalive_send.3 │ ├── libssh2_knownhost_add.3 │ ├── libssh2_knownhost_addc.3 │ ├── libssh2_knownhost_check.3 │ ├── libssh2_knownhost_checkp.3 │ ├── libssh2_knownhost_del.3 │ ├── libssh2_knownhost_free.3 │ ├── libssh2_knownhost_get.3 │ ├── libssh2_knownhost_init.3 │ ├── libssh2_knownhost_readfile.3 │ ├── libssh2_knownhost_readline.3 │ ├── libssh2_knownhost_writefile.3 │ ├── libssh2_knownhost_writeline.3 │ ├── libssh2_poll.3 │ ├── libssh2_poll_channel_read.3 │ ├── libssh2_publickey_add.3 │ ├── libssh2_publickey_add_ex.3 │ ├── libssh2_publickey_init.3 │ ├── libssh2_publickey_list_fetch.3 │ ├── libssh2_publickey_list_free.3 │ ├── libssh2_publickey_remove.3 │ ├── libssh2_publickey_remove_ex.3 │ ├── libssh2_publickey_shutdown.3 │ ├── libssh2_scp_recv.3 │ ├── libssh2_scp_recv2.3 │ ├── libssh2_scp_send.3 │ ├── libssh2_scp_send64.3 │ ├── libssh2_scp_send_ex.3 │ ├── libssh2_session_abstract.3 │ ├── libssh2_session_banner_get.3 │ ├── libssh2_session_banner_set.3 │ ├── libssh2_session_block_directions.3 │ ├── libssh2_session_callback_set.3 │ ├── libssh2_session_callback_set2.3 │ ├── libssh2_session_disconnect.3 │ ├── libssh2_session_disconnect_ex.3 │ ├── libssh2_session_flag.3 │ ├── libssh2_session_free.3 │ ├── libssh2_session_get_blocking.3 │ ├── libssh2_session_get_read_timeout.3 │ ├── libssh2_session_get_timeout.3 │ ├── libssh2_session_handshake.3 │ ├── libssh2_session_hostkey.3 │ ├── libssh2_session_init.3 │ ├── libssh2_session_init_ex.3 │ ├── libssh2_session_last_errno.3 │ ├── libssh2_session_last_error.3 │ ├── libssh2_session_method_pref.3 │ ├── libssh2_session_methods.3 │ ├── libssh2_session_set_blocking.3 │ ├── libssh2_session_set_last_error.3 │ ├── libssh2_session_set_read_timeout.3 │ ├── libssh2_session_set_timeout.3 │ ├── libssh2_session_startup.3 │ ├── libssh2_session_supported_algs.3 │ ├── libssh2_sftp_close.3 │ ├── libssh2_sftp_close_handle.3 │ ├── libssh2_sftp_closedir.3 │ ├── libssh2_sftp_fsetstat.3 │ ├── libssh2_sftp_fstat.3 │ ├── libssh2_sftp_fstat_ex.3 │ ├── libssh2_sftp_fstatvfs.3 │ ├── libssh2_sftp_fsync.3 │ ├── libssh2_sftp_get_channel.3 │ ├── libssh2_sftp_init.3 │ ├── libssh2_sftp_last_error.3 │ ├── libssh2_sftp_lstat.3 │ ├── libssh2_sftp_mkdir.3 │ ├── libssh2_sftp_mkdir_ex.3 │ ├── libssh2_sftp_open.3 │ ├── libssh2_sftp_open_ex.3 │ ├── libssh2_sftp_open_ex_r.3 │ ├── libssh2_sftp_open_r.3 │ ├── libssh2_sftp_opendir.3 │ ├── libssh2_sftp_posix_rename.3 │ ├── libssh2_sftp_posix_rename_ex.3 │ ├── libssh2_sftp_read.3 │ ├── libssh2_sftp_readdir.3 │ ├── libssh2_sftp_readdir_ex.3 │ ├── libssh2_sftp_readlink.3 │ ├── libssh2_sftp_realpath.3 │ ├── libssh2_sftp_rename.3 │ ├── libssh2_sftp_rename_ex.3 │ ├── libssh2_sftp_rewind.3 │ ├── libssh2_sftp_rmdir.3 │ ├── libssh2_sftp_rmdir_ex.3 │ ├── libssh2_sftp_seek.3 │ ├── libssh2_sftp_seek64.3 │ ├── libssh2_sftp_setstat.3 │ ├── libssh2_sftp_shutdown.3 │ ├── libssh2_sftp_stat.3 │ ├── libssh2_sftp_stat_ex.3 │ ├── libssh2_sftp_statvfs.3 │ ├── libssh2_sftp_symlink.3 │ ├── libssh2_sftp_symlink_ex.3 │ ├── libssh2_sftp_tell.3 │ ├── libssh2_sftp_tell64.3 │ ├── libssh2_sftp_unlink.3 │ ├── libssh2_sftp_unlink_ex.3 │ ├── libssh2_sftp_write.3 │ ├── libssh2_sign_sk.3 │ ├── libssh2_trace.3 │ ├── libssh2_trace_sethandler.3 │ ├── libssh2_userauth_authenticated.3 │ ├── libssh2_userauth_banner.3 │ ├── libssh2_userauth_hostbased_fromfile.3 │ ├── libssh2_userauth_hostbased_fromfile_ex.3 │ ├── libssh2_userauth_keyboard_interactive.3 │ ├── libssh2_userauth_keyboard_interactive_ex.3 │ ├── libssh2_userauth_list.3 │ ├── libssh2_userauth_password.3 │ ├── libssh2_userauth_password_ex.3 │ ├── libssh2_userauth_publickey.3 │ ├── libssh2_userauth_publickey_fromfile.3 │ ├── libssh2_userauth_publickey_fromfile_ex.3 │ ├── libssh2_userauth_publickey_frommemory.3 │ ├── libssh2_userauth_publickey_sk.3 │ ├── libssh2_version.3 │ └── template.3 ├── example │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── Makefile.in │ ├── Makefile.inc │ ├── direct_tcpip.c │ ├── scp.c │ ├── scp_nonblock.c │ ├── scp_write.c │ ├── scp_write_nonblock.c │ ├── sftp.c │ ├── sftp_RW_nonblock.c │ ├── sftp_append.c │ ├── sftp_mkdir.c │ ├── sftp_mkdir_nonblock.c │ ├── sftp_nonblock.c │ ├── sftp_write.c │ ├── sftp_write_nonblock.c │ ├── sftp_write_sliding.c │ ├── sftpdir.c │ ├── sftpdir_nonblock.c │ ├── ssh2.c │ ├── ssh2_agent.c │ ├── ssh2_agent_forwarding.c │ ├── ssh2_echo.c │ ├── ssh2_exec.c │ ├── subsystem_netconf.c │ ├── tcpip-forward.c │ └── x11.c ├── get_ver.awk ├── git2news.pl ├── include │ ├── libssh2.h │ ├── libssh2_publickey.h │ └── libssh2_sftp.h ├── install-sh ├── libssh2-style.el ├── libssh2.pc.in ├── ltmain.sh ├── m4 │ ├── lib-ld.m4 │ ├── lib-link.m4 │ ├── lib-prefix.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ └── lt~obsolete.m4 ├── maketgz ├── missing ├── os400 │ ├── README400 │ ├── ccsid.c │ ├── config400.default │ ├── include │ │ ├── alloca.h │ │ ├── assert.h │ │ └── sys │ │ │ └── socket.h │ ├── initscript.sh │ ├── libssh2_ccsid.h │ ├── libssh2_config.h │ ├── libssh2rpg │ │ ├── libssh2.rpgle.in │ │ ├── libssh2_ccsid.rpgle.in │ │ ├── libssh2_publickey.rpgle │ │ └── libssh2_sftp.rpgle │ ├── macros.h │ ├── make-include.sh │ ├── make-rpg.sh │ ├── make-src.sh │ ├── make.sh │ ├── os400sys.c │ └── rpg-examples │ │ └── SFTPXMPLE ├── src │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── Makefile.in │ ├── Makefile.inc │ ├── agent.c │ ├── agent_win.c │ ├── bcrypt_pbkdf.c │ ├── blowfish.c │ ├── chacha.c │ ├── chacha.h │ ├── channel.c │ ├── channel.h │ ├── cipher-chachapoly.c │ ├── cipher-chachapoly.h │ ├── comp.c │ ├── comp.h │ ├── crypt.c │ ├── crypto.c │ ├── crypto.h │ ├── crypto_config.h │ ├── global.c │ ├── hostkey.c │ ├── keepalive.c │ ├── kex.c │ ├── knownhost.c │ ├── libgcrypt.c │ ├── libgcrypt.h │ ├── libssh2.rc │ ├── libssh2_config.h.in │ ├── libssh2_config_cmake.h.in │ ├── libssh2_priv.h │ ├── libssh2_setup.h │ ├── mac.c │ ├── mac.h │ ├── mbedtls.c │ ├── mbedtls.h │ ├── misc.c │ ├── misc.h │ ├── openssl.c │ ├── openssl.h │ ├── os400qc3.c │ ├── os400qc3.h │ ├── packet.c │ ├── packet.h │ ├── pem.c │ ├── poly1305.c │ ├── poly1305.h │ ├── publickey.c │ ├── scp.c │ ├── session.c │ ├── session.h │ ├── sftp.c │ ├── sftp.h │ ├── transport.c │ ├── transport.h │ ├── userauth.c │ ├── userauth.h │ ├── userauth_kbd_packet.c │ ├── userauth_kbd_packet.h │ ├── version.c │ ├── wincng.c │ └── wincng.h ├── tap-driver.sh ├── test-driver ├── tests │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── Makefile.in │ ├── Makefile.inc │ ├── key_dsa │ ├── key_dsa.pub │ ├── key_dsa_wrong │ ├── key_dsa_wrong.pub │ ├── key_ecdsa │ ├── key_ecdsa.pub │ ├── key_ecdsa_signed │ ├── key_ecdsa_signed-cert.pub │ ├── key_ecdsa_signed.pub │ ├── key_ed25519 │ ├── key_ed25519.pub │ ├── key_ed25519_encrypted │ ├── key_ed25519_encrypted.pub │ ├── key_rsa │ ├── key_rsa.pub │ ├── key_rsa_aes256gcm │ ├── key_rsa_aes256gcm.pub │ ├── key_rsa_encrypted │ ├── key_rsa_encrypted.pub │ ├── key_rsa_openssh │ ├── key_rsa_openssh.pub │ ├── key_rsa_sha2_256_signed │ ├── key_rsa_sha2_256_signed-cert.pub │ ├── key_rsa_sha2_256_signed.pub │ ├── key_rsa_signed │ ├── key_rsa_signed-cert.pub │ ├── key_rsa_signed.pub │ ├── mansyntax.sh │ ├── openssh_fixture.c │ ├── openssh_fixture.h │ ├── openssh_server │ │ ├── Dockerfile │ │ ├── authorized_keys │ │ ├── ca_ecdsa │ │ ├── ca_ecdsa.pub │ │ ├── ca_rsa │ │ ├── ca_rsa.pub │ │ ├── ca_user_keys.pub │ │ ├── ssh_host_ecdsa_key │ │ ├── ssh_host_ed25519_key │ │ ├── ssh_host_rsa_key │ │ └── sshd_config │ ├── ossfuzz │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── ossfuzz.sh │ │ ├── ssh2_client_fuzzer.cc │ │ ├── standaloneengine.cc │ │ └── testinput.h │ ├── runner.c │ ├── runner.h │ ├── session_fixture.c │ ├── session_fixture.h │ ├── test_aa_warmup.c │ ├── test_agent_forward_ok.c │ ├── test_auth_keyboard_fail.c │ ├── test_auth_keyboard_info_request.c │ ├── test_auth_keyboard_ok.c │ ├── test_auth_password_fail_password.c │ ├── test_auth_password_fail_username.c │ ├── test_auth_password_ok.c │ ├── test_auth_pubkey_fail.c │ ├── test_auth_pubkey_ok_dsa.c │ ├── test_auth_pubkey_ok_ecdsa.c │ ├── test_auth_pubkey_ok_ecdsa_signed.c │ ├── test_auth_pubkey_ok_ed25519.c │ ├── test_auth_pubkey_ok_ed25519_encrypted.c │ ├── test_auth_pubkey_ok_ed25519_mem.c │ ├── test_auth_pubkey_ok_rsa.c │ ├── test_auth_pubkey_ok_rsa_aes256gcm.c │ ├── test_auth_pubkey_ok_rsa_encrypted.c │ ├── test_auth_pubkey_ok_rsa_openssh.c │ ├── test_auth_pubkey_ok_rsa_sha2_256_signed.c │ ├── test_auth_pubkey_ok_rsa_signed.c │ ├── test_hostkey.c │ ├── test_hostkey_hash.c │ ├── test_read.c │ ├── test_read_algos.test │ ├── test_read_algos.txt │ ├── test_simple.c │ ├── test_ssh2.c │ └── test_sshd.test └── vms │ ├── libssh2_config.h │ ├── libssh2_make_example.dcl │ ├── libssh2_make_help.dcl │ ├── libssh2_make_kit.dcl │ ├── libssh2_make_lib.dcl │ ├── man2help.c │ └── readme.vms ├── requirements_dev.txt ├── setup.cfg ├── setup.py ├── ssh2 ├── __init__.pxd ├── __init__.py ├── _version.py ├── agent.c ├── agent.pxd ├── agent.pyx ├── c_pkey.pxd ├── c_sftp.pxd ├── c_ssh2.pxd ├── c_stat.pxd ├── channel.c ├── channel.pxd ├── channel.pyx ├── error_codes.c ├── error_codes.pxd ├── error_codes.pyx ├── exceptions.c ├── exceptions.pyx ├── ext │ ├── find_eol.c │ └── find_eol.h ├── fileinfo.c ├── fileinfo.pxd ├── fileinfo.pyx ├── knownhost.c ├── knownhost.pxd ├── knownhost.pyx ├── listener.c ├── listener.pxd ├── listener.pyx ├── pkey.c ├── pkey.pxd ├── pkey.pyx ├── publickey.c ├── publickey.pxd ├── publickey.pyx ├── session.c ├── session.pxd ├── session.pyx ├── sftp.c ├── sftp.pxd ├── sftp.pyx ├── sftp_handle.c ├── sftp_handle.pxd ├── sftp_handle.pyx ├── statinfo.c ├── statinfo.pxd ├── statinfo.pyx ├── utils.c ├── utils.pxd └── utils.pyx ├── tests ├── __init__.py ├── base_test.py ├── known_hosts ├── test_agent.py ├── test_channel.py ├── test_exceptions.py ├── test_knownhost.py ├── test_session.py ├── test_sftp.py └── test_utils.py ├── versioneer.py └── zlib-1.2.11 ├── CMakeLists.txt ├── ChangeLog ├── FAQ ├── INDEX ├── Makefile ├── Makefile.in ├── README ├── adler32.c ├── amiga ├── Makefile.pup └── Makefile.sas ├── compress.c ├── configure ├── contrib ├── README.contrib ├── ada │ ├── buffer_demo.adb │ ├── mtest.adb │ ├── read.adb │ ├── readme.txt │ ├── test.adb │ ├── zlib-streams.adb │ ├── zlib-streams.ads │ ├── zlib-thin.adb │ ├── zlib-thin.ads │ ├── zlib.adb │ ├── zlib.ads │ └── zlib.gpr ├── amd64 │ └── amd64-match.S ├── asm686 │ ├── README.686 │ └── match.S ├── blast │ ├── Makefile │ ├── README │ ├── blast.c │ ├── blast.h │ ├── test.pk │ └── test.txt ├── delphi │ ├── ZLib.pas │ ├── ZLibConst.pas │ ├── readme.txt │ └── zlibd32.mak ├── dotzlib │ ├── DotZLib.build │ ├── DotZLib.chm │ ├── DotZLib.sln │ ├── DotZLib │ │ ├── AssemblyInfo.cs │ │ ├── ChecksumImpl.cs │ │ ├── CircularBuffer.cs │ │ ├── CodecBase.cs │ │ ├── Deflater.cs │ │ ├── DotZLib.cs │ │ ├── DotZLib.csproj │ │ ├── GZipStream.cs │ │ ├── Inflater.cs │ │ └── UnitTests.cs │ ├── LICENSE_1_0.txt │ └── readme.txt ├── gcc_gvmat64 │ └── gvmat64.S ├── infback9 │ ├── README │ ├── infback9.c │ ├── infback9.h │ ├── inffix9.h │ ├── inflate9.h │ ├── inftree9.c │ └── inftree9.h ├── inflate86 │ ├── inffas86.c │ └── inffast.S ├── iostream │ ├── test.cpp │ ├── zfstream.cpp │ └── zfstream.h ├── iostream2 │ ├── zstream.h │ └── zstream_test.cpp ├── iostream3 │ ├── README │ ├── TODO │ ├── test.cc │ ├── zfstream.cc │ └── zfstream.h ├── masmx64 │ ├── bld_ml64.bat │ ├── gvmat64.asm │ ├── inffas8664.c │ ├── inffasx64.asm │ └── readme.txt ├── masmx86 │ ├── bld_ml32.bat │ ├── inffas32.asm │ ├── match686.asm │ └── readme.txt ├── minizip │ ├── Makefile │ ├── Makefile.am │ ├── MiniZip64_Changes.txt │ ├── MiniZip64_info.txt │ ├── configure.ac │ ├── crypt.h │ ├── ioapi.c │ ├── ioapi.h │ ├── iowin32.c │ ├── iowin32.h │ ├── make_vms.com │ ├── miniunz.c │ ├── miniunzip.1 │ ├── minizip.1 │ ├── minizip.c │ ├── minizip.pc.in │ ├── mztools.c │ ├── mztools.h │ ├── unzip.c │ ├── unzip.h │ ├── zip.c │ └── zip.h ├── pascal │ ├── example.pas │ ├── readme.txt │ ├── zlibd32.mak │ └── zlibpas.pas ├── puff │ ├── Makefile │ ├── README │ ├── puff.c │ ├── puff.h │ ├── pufftest.c │ └── zeros.raw ├── testzlib │ ├── testzlib.c │ └── testzlib.txt ├── untgz │ ├── Makefile │ ├── Makefile.msc │ └── untgz.c └── vstudio │ ├── readme.txt │ ├── vc10 │ ├── miniunz.vcxproj │ ├── miniunz.vcxproj.filters │ ├── minizip.vcxproj │ ├── minizip.vcxproj.filters │ ├── testzlib.vcxproj │ ├── testzlib.vcxproj.filters │ ├── testzlibdll.vcxproj │ ├── testzlibdll.vcxproj.filters │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibstat.vcxproj.filters │ ├── zlibvc.def │ ├── zlibvc.sln │ ├── zlibvc.vcxproj │ └── zlibvc.vcxproj.filters │ ├── vc11 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ ├── vc12 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ ├── vc14 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ └── vc9 │ ├── miniunz.vcproj │ ├── minizip.vcproj │ ├── testzlib.vcproj │ ├── testzlibdll.vcproj │ ├── zlib.rc │ ├── zlibstat.vcproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcproj ├── crc32.c ├── crc32.h ├── deflate.c ├── deflate.h ├── examples ├── README.examples ├── enough.c ├── fitblk.c ├── gun.c ├── gzappend.c ├── gzjoin.c ├── gzlog.c ├── gzlog.h ├── zlib_how.html ├── zpipe.c └── zran.c ├── gzclose.c ├── gzguts.h ├── gzlib.c ├── gzread.c ├── gzwrite.c ├── infback.c ├── inffast.c ├── inffast.h ├── inffixed.h ├── inflate.c ├── inflate.h ├── inftrees.c ├── inftrees.h ├── make_vms.com ├── msdos ├── Makefile.bor ├── Makefile.dj2 ├── Makefile.emx ├── Makefile.msc └── Makefile.tc ├── nintendods ├── Makefile └── README ├── old ├── Makefile.emx ├── Makefile.riscos ├── README ├── descrip.mms ├── os2 │ ├── Makefile.os2 │ └── zlib.def └── visual-basic.txt ├── os400 ├── README400 ├── bndsrc ├── make.sh └── zlib.inc ├── qnx └── package.qpg ├── test ├── example.c ├── infcover.c └── minigzip.c ├── treebuild.xml ├── trees.c ├── trees.h ├── uncompr.c ├── watcom ├── watcom_f.mak └── watcom_l.mak ├── win32 ├── DLL_FAQ.txt ├── Makefile.bor ├── Makefile.gcc ├── Makefile.msc ├── README-WIN32.txt ├── VisualC.txt ├── zlib.def └── zlib1.rc ├── zconf.h ├── zconf.h.cmakein ├── zconf.h.in ├── zlib.3 ├── zlib.3.pdf ├── zlib.h ├── zlib.map ├── zlib.pc.cmakein ├── zlib.pc.in ├── zlib2ansi ├── zutil.c └── zutil.h /.gitattributes: -------------------------------------------------------------------------------- 1 | openssl-1.0.2q-i386-win32.zip filter=lfs diff=lfs merge=lfs -text 2 | openssl-1.0.2q-x64_86-win64.zip filter=lfs diff=lfs merge=lfs -text 3 | zlib1211.zip filter=lfs diff=lfs merge=lfs -text 4 | *.tar.gz filter=lfs diff=lfs merge=lfs -text 5 | *.zip filter=lfs diff=lfs merge=lfs -text 6 | *.rpm filter=lfs diff=lfs merge=lfs -text 7 | ci/docker/manylinux/libssh2.tar.gz filter=lfs diff=lfs merge=lfs -text 8 | ci/docker/manylinux/cmake-2.8.11.1-5.4.x86_64.rpm filter=lfs diff=lfs merge=lfs -text 9 | ssh2/_version.py export-subst 10 | *.xz filter=lfs diff=lfs merge=lfs -text 11 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @pkittenis 2 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Directions 2 | 3 | _Issue tracker is for actionable bug reports, issues with the code and feature requests._ 4 | 5 | _See [Discussions](https://github.com/ParallelSSH/ssh2-python/discussions) section for questions and discussions._ 6 | 7 | _Remove this section and everything on and above this line._ 8 | 9 | ### Bug reports 10 | 11 | __Steps to reproduce:__ 12 | 13 | 1. Example code that produces error. 14 | 2. Stack trace or error messages. 15 | 16 | __Expected behaviour:__ [What was expected to happen.] 17 | 18 | __Actual behaviour:__ [What actually happened.] 19 | 20 | __Additional info:__ [Include version of ``libssh2`` and any other relevant information.] 21 | -------------------------------------------------------------------------------- /.github/workflows/lock-threads.yml: -------------------------------------------------------------------------------- 1 | name: 'Lock Threads' 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | discussions: write 12 | 13 | concurrency: 14 | group: lock-threads 15 | 16 | jobs: 17 | action: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: dessant/lock-threads@v5 21 | with: 22 | exclude-any-issue-labels: 'help wanted, upstream, PR welcome, api implementation' 23 | process-only: 'issues' 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info 2 | *.pyc 3 | dist 4 | build 5 | *~ 6 | *.so 7 | build_dir 8 | wheelhouse 9 | .idea/ 10 | ssh2/libssh2.so* 11 | doc/_build 12 | venv 13 | ci/docker/manylinux/*.gz 14 | results.xml 15 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | build: 3 | os: ubuntu-24.04 4 | tools: 5 | python: "3" 6 | apt_packages: 7 | - cmake 8 | - openssl 9 | sphinx: 10 | configuration: doc/conf.py 11 | python: 12 | install: 13 | - requirements: doc/requirements.txt 14 | - method: pip 15 | path: . 16 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include libssh2 * 2 | recursive-exclude docker * 3 | include _setup_libssh2.py 4 | include versioneer.py 5 | include ssh2/_version.py 6 | recursive-exclude .circleci * 7 | recursive-exclude ci * 8 | include LICENSE 9 | include ssh2/*.pyx 10 | include ssh2/*.pxd 11 | include ssh2/ext/find_eol* 12 | include ssh2/*.c 13 | -------------------------------------------------------------------------------- /ci/appveyor/build_package.bat: -------------------------------------------------------------------------------- 1 | dir ssh2/ 2 | 3 | for %%I in (%PYTHONVERS%) do %%I\python.exe -V 4 | for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build_ext 5 | for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py build 6 | for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py install 7 | 8 | dir ssh2/ 9 | 10 | cd dist 11 | for %%I in (%PYTHONVERS%) do %%I\python.exe -c "from ssh2.session import Session; Session()" 12 | cd .. 13 | 14 | for %%I in (%PYTHONVERS%) do %%I\python.exe setup.py bdist_wheel 15 | mv dist/* . 16 | -------------------------------------------------------------------------------- /ci/appveyor/build_ssh2.bat: -------------------------------------------------------------------------------- 1 | mkdir build_dir 2 | cd build_dir 3 | 4 | ECHO "Building with platform %MSVC%" 5 | cmake ..\libssh2 -G "NMake Makefiles" ^ 6 | -DCMAKE_BUILD_TYPE=Release ^ 7 | -DCRYPTO_BACKEND=OpenSSL ^ 8 | -G"%MSVC%" ^ 9 | -A x64 ^ 10 | -DBUILD_SHARED_LIBS=OFF ^ 11 | -DENABLE_ZLIB_COMPRESSION=ON ^ 12 | -DENABLE_CRYPT_NONE=ON ^ 13 | -DENABLE_MAC_NONE=ON ^ 14 | -DZLIB_LIBRARY=C:/zlib/lib/zlib.lib ^ 15 | -DZLIB_INCLUDE_DIR=C:/zlib/include ^ 16 | -DBUILD_EXAMPLES=OFF ^ 17 | -DBUILD_TESTING=OFF ^ 18 | -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% ^ 19 | -DOPENSSL_LIBRARIES=%OPENSSL_DIR%/lib/VC/x64/MD 20 | 21 | 22 | dir %OPENSSL_DIR%\lib\VC\x64\MD\ 23 | cp %OPENSSL_DIR%\lib\VC\x64\MD\libcrypto.lib %APPVEYOR_BUILD_FOLDER%\libcrypto64MD.lib 24 | cp %OPENSSL_DIR%\lib\VC\x64\MD\libssl.lib %APPVEYOR_BUILD_FOLDER%\libssl64MD.lib 25 | 26 | dir %APPVEYOR_BUILD_FOLDER%\ 27 | 28 | cmake --build . --config Release 29 | cd .. 30 | -------------------------------------------------------------------------------- /ci/appveyor/build_zlib.bat: -------------------------------------------------------------------------------- 1 | IF "%PYTHON_VERSION%" == "2.7" (exit 0) 2 | 3 | mkdir zlib_build && cd zlib_build 4 | 5 | cmake ..\zlib-1.2.11 ^ 6 | -A x64 ^ 7 | -DCMAKE_INSTALL_PREFIX="C:\zlib" ^ 8 | -DCMAKE_BUILD_TYPE=Release ^ 9 | -DBUILD_SHARED_LIBS=OFF 10 | ) 11 | 12 | cmake --build . --config Release --target install 13 | cd .. 14 | -------------------------------------------------------------------------------- /ci/appveyor/pypi_upload.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | import os 4 | 5 | 6 | def upload_pypi(files): 7 | repo_tag = os.environ['APPVEYOR_REPO_TAG'] 8 | if repo_tag == 'false': 9 | sys.stderr.write("Not a tagged release, skipping upload" + os.linesep) 10 | return 11 | _user, _pass = os.environ['PYPI_USER'], os.environ['PYPI_PASS'] 12 | try: 13 | subprocess.check_call(['twine', 'upload', '-u', _user, 14 | '-p', _pass, files]) 15 | except Exception: 16 | sys.stderr.write("Error uploading to PyPi" + os.linesep) 17 | 18 | 19 | if __name__ == "__main__": 20 | if not len(sys.argv) > 1: 21 | sys.stderr.write("Need files to upload argument" + os.linesep) 22 | sys.exit(1) 23 | upload_pypi(os.path.abspath(sys.argv[1])) 24 | -------------------------------------------------------------------------------- /ci/integration_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/ci/integration_tests/__init__.py -------------------------------------------------------------------------------- /ci/integration_tests/embedded_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/ci/integration_tests/embedded_server/__init__.py -------------------------------------------------------------------------------- /ci/integration_tests/embedded_server/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEsAAs2ew1xYntiiBAb3oqs7UC2Qd2kQ/eF+6WqOjeTFjWGksybnFidV91MwLjHdPmioz/1SleZqSqcD0csBcUs6jqclDlJ2MX8ZjL0e8hFDYpepFPTkwB2D6e55DwK0GJefiHUda5fKaaCzMN69h/RoBYurV/Zxf4+kRUAt+A5RXBGe22BdMtKW30J9endU9qWP4QDWtFXxvOjWHuJc7M/MNP2qww4yBo4xcKTabr8TC9uL7RUh4hMWdiNZnlmwSICT6k9NkkcBbDEIW0SjEcUMRB/V0qQ/J5Jeb8Lea82wDDdcfKaOPmI8ST5WtjfqPkKd9sqVhsq0gcCKtFZv0r 2 | -------------------------------------------------------------------------------- /ci/integration_tests/embedded_server/known_hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hpfAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMCKDqIexkgHAfID/6mqvmnSJf0b5W8v5h2pI/stOSwTQ+pxVhwJ9ctYDhRSlF0iTUWT10hcuO4Ks8= 2 | -------------------------------------------------------------------------------- /ci/integration_tests/embedded_server/rsa.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXQIBAAKBgQDI7iK3d8eWYZlYloat94c5VjtFY7c/0zuGl8C7uMnZ3t6i2G99 3 | 66hEW0nCFSZkOW5F0XKEVj+EUCHvo8koYC6wiohAqWQnEwIoOoh7GSAcB8gP/qaq 4 | +adIl/Rvlby/mHakj+y05LBND6nFWHAn1y1gOFFKUXSJNRZPXSFy47gqzwIBIwKB 5 | gQCbANjz7q/pCXZLp1Hz6tYHqOvlEmjK1iabB1oqafrMpJ0eibUX/u+FMHq6StR5 6 | M5413BaDWHokPdEJUnabfWXXR3SMlBUKrck0eAer1O8m78yxu3OEdpRk+znVo4DL 7 | guMeCdJB/qcF0kEsx+Q8HP42MZU1oCmk3PbfXNFwaHbWuwJBAOQ/ry/hLD7AqB8x 8 | DmCM82A9E59ICNNlHOhxpJoh6nrNTPCsBAEu/SmqrL8mS6gmbRKUaya5Lx1pkxj2 9 | s/kWOokCQQDhXCcYXjjWiIfxhl6Rlgkk1vmI0l6785XSJNv4P7pXjGmShXfIzroh 10 | S8uWK3tL0GELY7+UAKDTUEVjjQdGxYSXAkEA3bo1JzKCwJ3lJZ1ebGuqmADRO6UP 11 | 40xH977aadfN1mEI6cusHmgpISl0nG5YH7BMsvaT+bs1FUH8m+hXDzoqOwJBAK3Z 12 | X/za+KV/REya2z0b+GzgWhkXUGUa/owrEBdHGriQ47osclkUgPUdNqcLmaDilAF4 13 | 1Z4PHPrI5RJIONAx+JECQQC/fChqjBgFpk6iJ+BOdSexQpgfxH/u/457W10Y43HR 14 | soS+8btbHqjQkowQ/2NTlUfWvqIlfxs6ZbFsIp/HrhZL 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /ci/integration_tests/embedded_server/sshd_config.tmpl: -------------------------------------------------------------------------------- 1 | Protocol 2 2 | UsePAM no 3 | HostbasedAuthentication no 4 | IgnoreUserKnownHosts yes 5 | ListenAddress {{listen_ip}} 6 | HostKey {{parent_dir}}/ca_host_key 7 | 8 | MaxAuthTries 999 9 | MaxSessions 999 10 | MaxStartups 999 11 | # PerSourceMaxStartups 999 12 | # PerSourcePenaltyExemptList *.*.*.* 13 | 14 | AcceptEnv LANG LC_* 15 | Subsystem sftp internal-sftp 16 | AuthorizedKeysFile {{parent_dir}}/authorized_keys 17 | PidFile {{parent_dir}}/{{random_server}}.pid 18 | -------------------------------------------------------------------------------- /ci/integration_tests/test_agent.py: -------------------------------------------------------------------------------- 1 | from .base_test import SSH2TestCase 2 | from ssh2.agent import Agent 3 | 4 | 5 | class SessionTestCase(SSH2TestCase): 6 | 7 | def test_agent_pyobject(self): 8 | agent = Agent(self.session) 9 | self.assertIsInstance(agent, Agent) 10 | 11 | def test_agent_get_identities(self): 12 | agent = Agent(self.session) 13 | agent.connect() 14 | ids = agent.get_identities() 15 | self.assertIsInstance(ids, list) 16 | agent.disconnect() 17 | 18 | def test_agent_id_path(self): 19 | agent = Agent(self.session) 20 | agent.connect() 21 | _path = b'my_path' 22 | agent.set_identity_path(_path) 23 | path = agent.get_identity_path() 24 | self.assertEqual(_path, path) 25 | agent.disconnect() 26 | -------------------------------------------------------------------------------- /ci/integration_tests/unit_test_key.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEsAAs2ew1xYntiiBAb3oqs7UC2Qd2kQ/eF+6WqOjeTFjWGksybnFidV91MwLjHdPmioz/1SleZqSqcD0csBcUs6jqclDlJ2MX8ZjL0e8hFDYpepFPTkwB2D6e55DwK0GJefiHUda5fKaaCzMN69h/RoBYurV/Zxf4+kRUAt+A5RXBGe22BdMtKW30J9endU9qWP4QDWtFXxvOjWHuJc7M/MNP2qww4yBo4xcKTabr8TC9uL7RUh4hMWdiNZnlmwSICT6k9NkkcBbDEIW0SjEcUMRB/V0qQ/J5Jeb8Lea82wDDdcfKaOPmI8ST5WtjfqPkKd9sqVhsq0gcCKtFZv0r zefrer@kirin 2 | -------------------------------------------------------------------------------- /doc/Changelog.rst: -------------------------------------------------------------------------------- 1 | ../Changelog.rst -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = python -msphinx 7 | SPHINXPROJ = ssh2-python 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /doc/agent.rst: -------------------------------------------------------------------------------- 1 | ssh2.agent 2 | ============ 3 | 4 | .. automodule:: ssh2.agent 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/api.rst: -------------------------------------------------------------------------------- 1 | API Documentation 2 | ******************** 3 | 4 | .. toctree:: 5 | 6 | session 7 | channel 8 | agent 9 | sftp 10 | sftp_handle 11 | pkey 12 | listener 13 | knownhost 14 | exceptions 15 | statinfo 16 | fileinfo 17 | utils 18 | -------------------------------------------------------------------------------- /doc/channel.rst: -------------------------------------------------------------------------------- 1 | ssh2.channel 2 | ============ 3 | 4 | .. automodule:: ssh2.channel 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/exceptions.rst: -------------------------------------------------------------------------------- 1 | Exceptions 2 | =========== 3 | 4 | .. automodule:: ssh2.exceptions 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | :member-order: groupwise 9 | -------------------------------------------------------------------------------- /doc/fileinfo.rst: -------------------------------------------------------------------------------- 1 | File Info 2 | =========== 3 | 4 | .. automodule:: ssh2.fileinfo 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/introduction.rst: -------------------------------------------------------------------------------- 1 | ***************** 2 | Design And Goals 3 | ***************** 4 | 5 | This project's goals are to map 100% of the ``libssh2`` C API to Python, using Python semantics where appropriate. 6 | 7 | Design wise, the library is intentionally a thin wrapper of ``libssh2``, implemented in Cython, in order to have as little overhead and conversely as high performance as possible. 8 | 9 | Contributions are most welcome! 10 | -------------------------------------------------------------------------------- /doc/knownhost.rst: -------------------------------------------------------------------------------- 1 | ssh2.knownhost 2 | =============== 3 | 4 | .. automodule:: ssh2.knownhost 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/listener.rst: -------------------------------------------------------------------------------- 1 | ssh2.listener 2 | ============== 3 | 4 | .. automodule:: ssh2.listener 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/pkey.rst: -------------------------------------------------------------------------------- 1 | ssh2.pkey 2 | ============ 3 | 4 | .. automodule:: ssh2.pkey 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx_rtd_theme 3 | -------------------------------------------------------------------------------- /doc/session.rst: -------------------------------------------------------------------------------- 1 | ssh2.session 2 | ============ 3 | 4 | .. automodule:: ssh2.session 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/sftp.rst: -------------------------------------------------------------------------------- 1 | ssh2.sftp 2 | ============ 3 | 4 | .. automodule:: ssh2.sftp 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/sftp_handle.rst: -------------------------------------------------------------------------------- 1 | ssh2.sftp_handle 2 | ================== 3 | 4 | .. automodule:: ssh2.sftp_handle 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/statinfo.rst: -------------------------------------------------------------------------------- 1 | Stat Info 2 | =========== 3 | 4 | .. automodule:: ssh2.statinfo 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /doc/utils.rst: -------------------------------------------------------------------------------- 1 | Utility Functions 2 | =================== 3 | 4 | .. automodule:: ssh2.utils 5 | :members: 6 | :undoc-members: 7 | :member-order: groupwise 8 | -------------------------------------------------------------------------------- /examples/paramiko_echo.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | 3 | import paramiko 4 | 5 | client = paramiko.SSHClient() 6 | client.set_missing_host_key_policy( 7 | paramiko.MissingHostKeyPolicy()) 8 | client.connect('localhost') 9 | transport = client.get_transport() 10 | channel = transport.open_session() 11 | stdout = channel.makefile('rb') 12 | channel.exec_command('echo me') 13 | for line in stdout: 14 | print(line) 15 | channel.close() 16 | print("Exit status: %s" % channel.recv_exit_status()) 17 | -------------------------------------------------------------------------------- /libssh2/ChangeLog: -------------------------------------------------------------------------------- 1 | see NEWS 2 | -------------------------------------------------------------------------------- /libssh2/README: -------------------------------------------------------------------------------- 1 | libssh2 - SSH2 library 2 | ====================== 3 | 4 | libssh2 is a library implementing the SSH2 protocol, available under 5 | the revised BSD license. 6 | 7 | Web site: https://libssh2.org/ 8 | 9 | Mailing list: https://lists.haxx.se/listinfo/libssh2-devel 10 | 11 | License: see COPYING 12 | 13 | Source code: https://github.com/libssh2/libssh2 14 | 15 | Web site source code: https://github.com/libssh2/www 16 | 17 | Installation instructions are in: 18 | - docs/INSTALL_CMAKE for CMake 19 | - docs/INSTALL_AUTOTOOLS for Autotools 20 | -------------------------------------------------------------------------------- /libssh2/README.md: -------------------------------------------------------------------------------- 1 | # libssh2 - SSH2 library 2 | 3 | libssh2 is a library implementing the SSH2 protocol, available under 4 | the revised BSD license. 5 | 6 | [Web site](https://libssh2.org/) 7 | 8 | [Mailing list](https://lists.haxx.se/listinfo/libssh2-devel) 9 | 10 | [BSD Licensed](https://libssh2.org/license.html) 11 | 12 | [Web site source code](https://github.com/libssh2/www) 13 | 14 | Installation instructions: 15 | - [for CMake](docs/INSTALL_CMAKE.md) 16 | - [for autotools](docs/INSTALL_AUTOTOOLS) 17 | -------------------------------------------------------------------------------- /libssh2/cmake/libssh2-config.cmake.in: -------------------------------------------------------------------------------- 1 | # Copyright (C) The libssh2 project and its contributors. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | include(CMakeFindDependencyMacro) 5 | list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) 6 | 7 | if("@CRYPTO_BACKEND@" STREQUAL "OpenSSL") 8 | find_dependency(OpenSSL) 9 | elseif("@CRYPTO_BACKEND@" STREQUAL "wolfSSL") 10 | find_dependency(WolfSSL) 11 | elseif("@CRYPTO_BACKEND@" STREQUAL "Libgcrypt") 12 | find_dependency(Libgcrypt) 13 | elseif("@CRYPTO_BACKEND@" STREQUAL "mbedTLS") 14 | find_dependency(MbedTLS) 15 | endif() 16 | 17 | if(@ZLIB_FOUND@) 18 | find_dependency(ZLIB) 19 | endif() 20 | 21 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") 22 | 23 | # Alias for either shared or static library 24 | if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@) 25 | add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) 26 | endif() 27 | 28 | # Compatibility alias 29 | if(NOT TARGET Libssh2::@LIB_NAME@) 30 | add_library(Libssh2::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) 31 | endif() 32 | -------------------------------------------------------------------------------- /libssh2/docs/BINDINGS.md: -------------------------------------------------------------------------------- 1 | libssh2 bindings 2 | ================ 3 | 4 | Creative people have written bindings or interfaces for various environments 5 | and programming languages. Using one of these bindings allows you to take 6 | advantage of libssh2 directly from within your favourite language. 7 | 8 | The bindings listed below are not part of the libssh2 distribution archives, 9 | but must be downloaded and installed separately. 10 | 11 | 12 | 13 | [Cocoa/Objective-C](https://github.com/karelia/libssh2_sftp-Cocoa-wrapper) 14 | 15 | [Haskell FFI bindings](https://hackage.haskell.org/package/libssh2) 16 | 17 | [Perl Net::SSH2](https://metacpan.org/pod/Net::SSH2) 18 | 19 | [PHP ssh2](https://pecl.php.net/package/ssh2) 20 | 21 | [Python pylibssh2](https://pypi.python.org/pypi/pylibssh2) 22 | 23 | [Python-ctypes PySsh2](https://github.com/gellule/PySsh2) 24 | 25 | [Ruby libssh2-ruby](https://github.com/mitchellh/libssh2-ruby) 26 | -------------------------------------------------------------------------------- /libssh2/docs/HACKING.md: -------------------------------------------------------------------------------- 1 | # libssh2 source code style guide 2 | 3 | - 4 level indent 4 | - spaces-only (no tabs) 5 | - open braces on the if/for line: 6 | 7 | ``` 8 | if (banana) { 9 | go_nuts(); 10 | } 11 | ``` 12 | 13 | - keep source lines shorter than 80 columns 14 | - See `libssh2-style.el` for how to achieve this within Emacs 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_connect.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_connect 3 "23 Dec 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_connect - connect to an ssh-agent 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_agent_connect(LIBSSH2_AGENT *agent); 12 | .fi 13 | .SH DESCRIPTION 14 | Connect to an ssh-agent running on the system. 15 | 16 | Call \fBlibssh2_agent_disconnect(3)\fP to close the connection after 17 | you are doing using it. 18 | .SH RETURN VALUE 19 | Returns 0 if succeeded, or a negative value for error. 20 | .SH AVAILABILITY 21 | Added in libssh2 1.2 22 | .SH SEE ALSO 23 | .BR libssh2_agent_init(3) 24 | .BR libssh2_agent_disconnect(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_disconnect.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_disconnect 3 "23 Dec 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_disconnect - close a connection to an ssh-agent 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_agent_disconnect(LIBSSH2_AGENT *agent); 12 | .fi 13 | .SH DESCRIPTION 14 | Close a connection to an ssh-agent. 15 | 16 | .SH RETURN VALUE 17 | Returns 0 if succeeded, or a negative value for error. 18 | .SH AVAILABILITY 19 | Added in libssh2 1.2 20 | .SH SEE ALSO 21 | .BR libssh2_agent_connect(3) 22 | .BR libssh2_agent_free(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_free 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_free - free an ssh-agent handle 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_agent_free(LIBSSH2_AGENT *agent); 12 | .fi 13 | .SH DESCRIPTION 14 | Free an ssh-agent handle. This function also frees the internal 15 | collection of public keys. 16 | .SH RETURN VALUE 17 | None. 18 | .SH AVAILABILITY 19 | Added in libssh2 1.2 20 | .SH SEE ALSO 21 | .BR libssh2_agent_init(3) 22 | .BR libssh2_agent_disconnect(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_get_identity_path.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Will Cosgrove 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_get_identity_path 3 "6 Mar 2019" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_get_identity_path - gets the custom ssh-agent socket path 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | const char * 11 | libssh2_agent_get_identity_path(LIBSSH2_AGENT *agent); 12 | .fi 13 | .SH DESCRIPTION 14 | Returns the custom agent identity socket path if set using libssh2_agent_set_identity_path() 15 | 16 | .SH RETURN VALUE 17 | Returns the socket path on disk. 18 | .SH AVAILABILITY 19 | Added in libssh2 1.9 20 | .SH SEE ALSO 21 | .BR libssh2_agent_init(3) 22 | .BR libssh2_agent_set_identity_path(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_init.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_init 3 "23 Dec 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_init - init an ssh-agent handle 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_AGENT * 11 | libssh2_agent_init(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Init an ssh-agent handle. Returns the handle to an internal 15 | representation of an ssh-agent connection. After the successful 16 | initialization, an application can call \fBlibssh2_agent_connect(3)\fP 17 | to connect to a running ssh-agent. 18 | 19 | Call \fBlibssh2_agent_free(3)\fP to free the handle again after you are 20 | doing using it. 21 | .SH RETURN VALUE 22 | Returns a handle pointer or NULL if something went wrong. The returned handle 23 | is used as input to all other ssh-agent related functions libssh2 provides. 24 | .SH AVAILABILITY 25 | Added in libssh2 1.2 26 | .SH SEE ALSO 27 | .BR libssh2_agent_connect(3) 28 | .BR libssh2_agent_free(3) 29 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_list_identities.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_list_identities 3 "23 Dec 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_list_identities - request an ssh-agent to list of public keys. 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_agent_list_identities(LIBSSH2_AGENT *agent); 12 | .fi 13 | .SH DESCRIPTION 14 | Request an ssh-agent to list of public keys, and stores them in the 15 | internal collection of the handle. Call 16 | \fIlibssh2_agent_get_identity(3)\fP to get a public key off the 17 | collection. 18 | 19 | .SH RETURN VALUE 20 | Returns 0 if succeeded, or a negative value for error. 21 | .SH AVAILABILITY 22 | Added in libssh2 1.2 23 | .SH SEE ALSO 24 | .BR libssh2_agent_connect(3) 25 | .BR libssh2_agent_get_identity(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_set_identity_path.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Will Cosgrove 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_set_identity_path 3 "6 Mar 2019" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_set_identity_path - set an ssh-agent socket path on disk 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_agent_set_identity_path(LIBSSH2_AGENT *agent, const char *path); 12 | .fi 13 | .SH DESCRIPTION 14 | Allows a custom agent identity socket path instead of the default SSH_AUTH_SOCK env value 15 | 16 | .SH RETURN VALUE 17 | Returns void 18 | .SH AVAILABILITY 19 | Added in libssh2 1.9 20 | .SH SEE ALSO 21 | .BR libssh2_agent_init(3) 22 | .BR libssh2_agent_get_identity_path(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_agent_userauth.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daiki Ueno 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_agent_userauth 3 "23 Dec 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_agent_userauth - authenticate a session with a public key, with the help of ssh-agent 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_agent_userauth(LIBSSH2_AGENT *agent, 12 | const char *username, 13 | struct libssh2_agent_publickey *identity); 14 | .fi 15 | .SH DESCRIPTION 16 | \fIagent\fP - ssh-agent handle as returned by 17 | .BR libssh2_agent_init(3) 18 | 19 | \fIusername\fP - Remote user name to authenticate as. 20 | 21 | \fIidentity\fP - Public key to authenticate with, as returned by 22 | .BR libssh2_agent_get_identity(3) 23 | 24 | Attempt public key authentication with the help of ssh-agent. 25 | .SH RETURN VALUE 26 | Returns 0 if succeeded, or a negative value for error. 27 | .SH AVAILABILITY 28 | Added in libssh2 1.2 29 | .SH SEE ALSO 30 | .BR libssh2_agent_init(3) 31 | .BR libssh2_agent_get_identity(3) 32 | .BR libssh2_agent_sign(3) 33 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_base64_decode.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_base64_decode 3 "23 Dec 2008" "libssh2 1.0" "libssh2" 4 | .SH NAME 5 | libssh2_base64_decode - decode a base64 encoded string 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, 12 | unsigned int *dest_len, const char *src, 13 | unsigned int src_len); 14 | .fi 15 | .SH DESCRIPTION 16 | This function is deemed DEPRECATED and will be removed from libssh2 in a 17 | future version. Do not use it! 18 | 19 | Decode a base64 chunk and store it into a newly allocated buffer. 'dest_len' 20 | will be set to hold the length of the returned buffer that '*dest' will point 21 | to. 22 | 23 | The returned buffer is allocated by this function, but it is not clear how to 24 | free that memory! 25 | .SH BUGS 26 | The memory that *dest points to is allocated by the malloc function libssh2 27 | uses, but there is no way for an application to free this data in a safe and 28 | reliable way! 29 | .SH RETURN VALUE 30 | 0 if successful, \-1 if any error occurred. 31 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_direct_tcpip.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_direct_tcpip 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_direct_tcpip - convenience macro for \fIlibssh2_channel_direct_tcpip_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_CHANNEL * 11 | libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, 12 | const char *host, int port); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_direct_tcpip_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_direct_tcpip_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_direct_tcpip_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_direct_tcpip_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_eof.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_eof - check a channel's EOF status 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_eof(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIchannel\fP - active channel stream to set closed status on. 15 | 16 | Check if the remote host has sent an EOF status for the selected stream. 17 | .SH RETURN VALUE 18 | Returns 1 if the remote host has sent EOF, otherwise 0. Negative on 19 | failure. 20 | .SH SEE ALSO 21 | .BR libssh2_channel_close(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_exec.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_exec 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_exec - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_exec(LIBSSH2_CHANNEL *channel, const char *command); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_process_startup(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_process_startup(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_process_startup(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_process_startup(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_flush.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_flush 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_flush - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_flush(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_flush_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_flush_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_flush_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_flush_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_flush_stderr.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_flush_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_flush_stderr - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_flush_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_flush_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_flush_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_flush_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_forward_accept.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_forward_accept 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_forward_accept - accept a queued connection 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_CHANNEL * 11 | libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIlistener\fP is a forwarding listener instance as returned by 15 | \fBlibssh2_channel_forward_listen_ex(3)\fP. 16 | .SH RETURN VALUE 17 | A newly allocated channel instance or NULL on failure. 18 | .SH ERRORS 19 | When this function returns NULL use \fIlibssh2_session_last_errno(3)\fP to 20 | extract the error code. If that code is \fILIBSSH2_ERROR_EAGAIN\fP, the 21 | session is set to do non-blocking I/O but the call would block. 22 | .SH SEE ALSO 23 | .BR libssh2_channel_forward_listen_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_forward_cancel.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_forward_cancel 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_forward_cancel - cancel a forwarded TCP port 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIlistener\fP - Forwarding listener instance as returned by 15 | .BR libssh2_channel_forward_listen_ex(3) 16 | 17 | Instruct the remote host to stop listening for new connections on a previously 18 | requested host/port. 19 | .SH RETURN VALUE 20 | Return 0 on success or negative on failure. It returns 21 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 22 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 23 | .SH ERRORS 24 | \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. 25 | 26 | \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. 27 | .SH SEE ALSO 28 | .BR libssh2_channel_forward_listen_ex(3) 29 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_forward_listen.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_forward_listen 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_forward_listen - convenience macro for \fIlibssh2_channel_forward_listen_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_forward_listen_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_forward_listen_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_forward_listen_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_forward_listen_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_free 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_free - free all resources associated with a channel 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_free(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIchannel\fP - Channel stream to free. 15 | 16 | Release all resources associated with a channel stream. If the channel has 17 | not yet been closed with 18 | .BR libssh2_channel_close(3) 19 | , it will be called automatically so that the remote end may know that it 20 | can safely free its own resources. 21 | .SH RETURN VALUE 22 | Return 0 on success or negative on failure. It returns 23 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 24 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 25 | .SH SEE ALSO 26 | .BR libssh2_channel_close(3) 27 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_get_exit_status.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_get_exit_status 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_get_exit_status - get the remote exit code 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel) 12 | .fi 13 | .SH DESCRIPTION 14 | \fIchannel\fP - Closed channel stream to retrieve exit status from. 15 | 16 | Returns the exit code raised by the process running on the remote host at 17 | the other end of the named channel. Note that the exit status may not be 18 | available if the remote end has not yet set its status to closed. 19 | .SH RETURN VALUE 20 | Returns 0 on failure, otherwise the \fIExit Status\fP reported by remote host 21 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_ignore_extended_data.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_ignore_extended_data 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_ignore_extended_data - convenience macro for \fIlibssh2_channel_handle_extended_data(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_channel_ignore_extended_data(LIBSSH2_CHANNEL *channel, 12 | int ignore_mode); 13 | .fi 14 | .SH DESCRIPTION 15 | This function is \fBDEPRECATED\fP in 0.3.0. Use the 16 | \fIlibssh2_channel_handle_extended_data2(3)\fP function instead! 17 | 18 | This is a macro defined in a public libssh2 header file that is using the 19 | underlying function \fIlibssh2_channel_handle_extended_data(3)\fP. 20 | .SH RETURN VALUE 21 | See \fIlibssh2_channel_handle_extended_data(3)\fP 22 | .SH ERRORS 23 | See \fIlibssh2_channel_handle_extended_data(3)\fP 24 | .SH SEE ALSO 25 | .BR libssh2_channel_handle_extended_data(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_open_session.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_open_session 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_open_session - convenience macro for \fIlibssh2_channel_open_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_CHANNEL * 11 | libssh2_channel_open_session(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_open_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_open_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_open_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_open_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_read.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_read - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | ssize_t 11 | libssh2_channel_read(LIBSSH2_CHANNEL *channel, 12 | char *buf, size_t buflen); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_read_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_read_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_read_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_read_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_read_stderr.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_read_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_read_stderr - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | ssize_t 11 | libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel, 12 | char *buf, size_t buflen); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_read_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_read_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_read_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_read_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_request_auth_agent.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_request_auth_agent 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_request_auth_agent - request agent forwarding for a session 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_request_auth_agent(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | Request that agent forwarding be enabled for this SSH session. This sends the 15 | request over this specific channel, which causes the agent listener to be 16 | started on the remote side upon success. This agent listener will then run 17 | for the duration of the SSH session. 18 | 19 | \fIchannel\fP - Previously opened channel instance such as returned by 20 | .BR libssh2_channel_open_ex(3) 21 | .SH RETURN VALUE 22 | Return 0 on success or negative on failure. It returns 23 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 24 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_request_pty.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_request_pty 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_request_pty - convenience macro for \fIlibssh2_channel_request_pty_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_request_pty(LIBSSH2_SESSION *session, const char *term); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_request_pty_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_request_pty_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_request_pty_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_request_pty_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_request_pty_size.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_request_pty_size 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_request_pty_size - convenience macro for \fIlibssh2_channel_request_pty_size_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_request_pty_size(LIBSSH2_CHANNEL *channel, 12 | int width, int height); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_request_pty_size_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_request_pty_size_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_request_pty_size_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_request_pty_size_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_request_pty_size_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_request_pty_size_ex 3 "1 Jun 2007" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_channel_request_pty_size_ex - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH SEE ALSO 13 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_send_eof.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_send_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_send_eof - send EOF to remote server 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | Tell the remote host that no further data will be sent on the specified 15 | channel. Processes typically interpret this as a closed stdin descriptor. 16 | .SH RETURN VALUE 17 | Return 0 on success or negative on failure. It returns 18 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 19 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 20 | .SH ERRORS 21 | \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. 22 | .SH SEE ALSO 23 | .BR libssh2_channel_wait_eof(3) 24 | .BR libssh2_channel_eof(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_set_blocking.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_set_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_set_blocking - set or clear blocking mode on channel 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIchannel\fP - channel stream to set or clean blocking status on. 15 | 16 | \fIblocking\fP - Set to a non-zero value to make the channel block, or zero to 17 | make it non-blocking. 18 | 19 | Currently this is a short cut call to 20 | .BR libssh2_session_set_blocking(3) 21 | and therefore will affect the session and all channels. 22 | .SH RETURN VALUE 23 | None 24 | .SH SEE ALSO 25 | .BR libssh2_session_set_blocking(3) 26 | .BR libssh2_channel_read_ex(3) 27 | .BR libssh2_channel_write_ex(3) 28 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_setenv.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_setenv 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_setenv - convenience macro for \fIlibssh2_channel_setenv_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, 12 | const char *varname, const char *value); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_setenv_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_setenv_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_setenv_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_setenv_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_shell.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_shell 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_shell - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_shell(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_process_startup(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_process_startup(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_process_startup(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_process_startup(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_subsystem.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_subsystem 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_subsystem - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_subsystem(LIBSSH2_CHANNEL *channel, const char *subsystem); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_process_startup(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_process_startup(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_process_startup(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_process_startup(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_wait_closed.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_wait_closed 3 "29 Nov 2007" "libssh2 0.19" "libssh2" 4 | .SH NAME 5 | libssh2_channel_wait_closed - wait for the remote to close the channel 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | Enter a temporary blocking state until the remote host closes the named 15 | channel. Typically sent after \fIlibssh2_channel_close(3)\fP in order to 16 | examine the exit status. 17 | 18 | .SH RETURN VALUE 19 | Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN 20 | when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative 21 | number, it is not really a failure per se. 22 | .SH SEE ALSO 23 | .BR libssh2_channel_send_eof(3) 24 | .BR libssh2_channel_eof(3) 25 | .BR libssh2_channel_wait_eof(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_wait_eof.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_wait_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_wait_eof - wait for the remote to reply to an EOF request 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | Wait for the remote end to send EOF. 15 | 16 | .SH RETURN VALUE 17 | Return 0 on success or negative on failure. It returns 18 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 19 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 20 | .SH SEE ALSO 21 | .BR libssh2_channel_send_eof(3) 22 | .BR libssh2_channel_eof(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_window_read.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_window_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_window_read - convenience macro for \fIlibssh2_channel_window_read_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | unsigned long 11 | libssh2_channel_window_read(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_window_read_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_window_read_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_window_read_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_window_read_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_window_read_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_window_read_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_window_read_ex - Check the status of the read window 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | unsigned long 11 | libssh2_channel_window_read_ex(LIBSSH2_CHANNEL *channel, 12 | unsigned long *read_avail, 13 | unsigned long *window_size_initial) 14 | .fi 15 | .SH DESCRIPTION 16 | Check the status of the read window. Returns the number of bytes which the 17 | remote end may send without overflowing the window limit read_avail (if 18 | passed) will be populated with the number of bytes actually available to be 19 | read window_size_initial (if passed) will be populated with the 20 | window_size_initial as defined by the channel_open request 21 | .SH RETURN VALUE 22 | The number of bytes which the remote end may send without overflowing the 23 | window limit 24 | .SH ERRORS 25 | .SH SEE ALSO 26 | .BR libssh2_channel_receive_window_adjust(3), 27 | .BR libssh2_channel_window_write_ex(3) 28 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_window_write.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_window_write 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_window_write - convenience macro for \fIlibssh2_channel_window_write_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | unsigned long 11 | libssh2_channel_window_write(LIBSSH2_CHANNEL *channel); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_window_write_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_window_write_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_window_write_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_window_write_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_window_write_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_window_write_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_channel_window_write_ex - Check the status of the write window 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | unsigned long 11 | libssh2_channel_window_write_ex(LIBSSH2_CHANNEL *channel, 12 | unsigned long *window_size_initial) 13 | .fi 14 | .SH DESCRIPTION 15 | Check the status of the write window Returns the number of bytes which may be 16 | safely written on the channel without blocking. 'window_size_initial' (if 17 | passed) will be populated with the size of the initial window as defined by 18 | the channel_open request 19 | .SH RETURN VALUE 20 | Number of bytes which may be safely written on the channel without blocking. 21 | .SH ERRORS 22 | .SH SEE ALSO 23 | .BR libssh2_channel_window_read_ex(3), 24 | .BR libssh2_channel_receive_window_adjust(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_write.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_write 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_write - convenience macro for \fIlibssh2_channel_write_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | ssize_t 11 | libssh2_channel_write(LIBSSH2_CHANNEL *channel, 12 | const char *buf, size_t buflen); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_write_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_write_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_write_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_write_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_write_stderr.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_write_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_write_stderr - convenience macro for \fIlibssh2_channel_write_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | ssize_t 11 | libssh2_channel_write_stderr(LIBSSH2_CHANNEL *channel, 12 | const char *buf, size_t buflen); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_channel_write_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_channel_write_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_channel_write_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_channel_write_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_channel_x11_req.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_channel_x11_req 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_channel_x11_req - convenience macro for \fIlibssh2_channel_x11_req_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_channel_x11_req_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_channel_x11_req_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_channel_x11_req_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_channel_x11_req_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_crypto_engine.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_crypto_engine 3 "22 Nov 2021" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_crypto_engine - retrieve used crypto engine 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | libssh2_crypto_engine_t 11 | libssh2_crypto_engine(void); 12 | .fi 13 | .SH DESCRIPTION 14 | Returns currently used crypto engine, as en enum value. 15 | .SH AVAILABILITY 16 | Added in libssh2 1.11 17 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_exit.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_exit 3 "19 Mar 2010" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_exit - global library deinitialization 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_exit(void); 12 | .fi 13 | .SH DESCRIPTION 14 | Exit the libssh2 functions and frees all memory used internal. 15 | .SH AVAILABILITY 16 | Added in libssh2 1.2.5 17 | .SH SEE ALSO 18 | .BR libssh2_init(3) 19 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_free 3 "13 Oct 2010" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_free - deallocate libssh2 memory 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_free(LIBSSH2_SESSION *session, void *ptr); 12 | .fi 13 | .SH DESCRIPTION 14 | Deallocate memory allocated by earlier call to libssh2 functions. It 15 | uses the memory allocation callbacks provided by the application, if any. 16 | Otherwise, this will call free(). 17 | 18 | This function is mostly useful under Windows when libssh2 is linked to 19 | one run-time library and the application to another. 20 | .SH AVAILABILITY 21 | Added in libssh2 1.2.8 22 | .SH SEE ALSO 23 | .BR libssh2_session_init_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_init.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_init 3 "19 Mar 2010" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_init - global library initialization 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | #define LIBSSH2_INIT_NO_CRYPTO 0x0001 11 | 12 | int 13 | libssh2_init(int flags); 14 | .fi 15 | .SH DESCRIPTION 16 | Initialize the libssh2 functions. This typically initialize the 17 | crypto library. It uses a global state, and is not thread safe -- you 18 | must make sure this function is not called concurrently. 19 | .SH RETURN VALUE 20 | Returns 0 if succeeded, or a negative value for error. 21 | .SH AVAILABILITY 22 | Added in libssh2 1.2.5 23 | .SH SEE ALSO 24 | .BR libssh2_exit(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_keepalive_config.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_keepalive_config 3 "12 Apr 2011" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_keepalive_config - short function description 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_keepalive_config(LIBSSH2_SESSION *session, 12 | int want_reply, 13 | unsigned int interval); 14 | .fi 15 | .SH DESCRIPTION 16 | Set how often keepalive messages should be sent. \fBwant_reply\fP indicates 17 | whether the keepalive messages should request a response from the server. 18 | \fBinterval\fP is number of seconds that can pass without any I/O, use 0 (the 19 | default) to disable keepalives. To avoid some busy-loop corner-cases, if you 20 | specify an interval of 1 it will be treated as 2. 21 | 22 | Note that non-blocking applications are responsible for sending the keepalive 23 | messages using \fBlibssh2_keepalive_send(3)\fP. 24 | .SH RETURN VALUE 25 | Nothing 26 | .SH AVAILABILITY 27 | Added in libssh2 1.2.5 28 | .SH SEE ALSO 29 | .BR libssh2_keepalive_send(3) 30 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_keepalive_send.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_keepalive_send 3 "13 Apr 2011" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_keepalive_send - short function description 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_keepalive_send(LIBSSH2_SESSION *session, 12 | int *seconds_to_next); 13 | .fi 14 | .SH DESCRIPTION 15 | Send a keepalive message if needed. \fBseconds_to_next\fP indicates how many 16 | seconds you can sleep after this call before you need to call it again. 17 | .SH RETURN VALUE 18 | Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on I/O errors. 19 | .SH AVAILABILITY 20 | Added in libssh2 1.2.5 21 | .SH SEE ALSO 22 | .BR libssh2_keepalive_config(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_del.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_del 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_del - delete a known host entry 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_knownhost_del(LIBSSH2_KNOWNHOSTS *hosts, 12 | struct libssh2_knownhost *entry); 13 | .fi 14 | .SH DESCRIPTION 15 | Delete a known host entry from the collection of known hosts. 16 | 17 | \fIentry\fP is a pointer to a struct that you can extract with 18 | \fIlibssh2_knownhost_check(3)\fP or \fIlibssh2_knownhost_get(3)\fP. 19 | .SH RETURN VALUE 20 | Returns a regular libssh2 error code, where negative values are error codes 21 | and 0 indicates success. 22 | .SH AVAILABILITY 23 | Added in libssh2 1.2 24 | .SH SEE ALSO 25 | .BR libssh2_knownhost_init(3) 26 | .BR libssh2_knownhost_free(3) 27 | .BR libssh2_knownhost_add(3) 28 | .BR libssh2_knownhost_check(3) 29 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_free 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_free - free a collection of known hosts 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts); 12 | .fi 13 | .SH DESCRIPTION 14 | Free a collection of known hosts. 15 | .SH RETURN VALUE 16 | None. 17 | .SH AVAILABILITY 18 | Added in libssh2 1.2 19 | .SH SEE ALSO 20 | .BR libssh2_knownhost_init(3) 21 | .BR libssh2_knownhost_add(3) 22 | .BR libssh2_knownhost_check(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_init.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_init 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_init - init a collection of known hosts 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_KNOWNHOSTS * 11 | libssh2_knownhost_init(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Init a collection of known hosts for this session. Returns the handle to an 15 | internal representation of a known host collection. 16 | 17 | Call \fBlibssh2_knownhost_free(3)\fP to free the collection again after you are 18 | doing using it. 19 | .SH RETURN VALUE 20 | Returns a handle pointer or NULL if something went wrong. The returned handle 21 | is used as input to all other known host related functions libssh2 provides. 22 | .SH AVAILABILITY 23 | Added in libssh2 1.2 24 | .SH SEE ALSO 25 | .BR libssh2_knownhost_free(3) 26 | .BR libssh2_knownhost_add(3) 27 | .BR libssh2_knownhost_check(3) 28 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_readfile.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_readfile 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_readfile - parse a file of known hosts 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_knownhost_readfile(LIBSSH2_KNOWNHOSTS *hosts, 12 | const char *filename, int type); 13 | .fi 14 | .SH DESCRIPTION 15 | Reads a collection of known hosts from a specified file and adds them to the 16 | collection of known hosts. 17 | 18 | \fIfilename\fP specifies which file to read 19 | 20 | \fItype\fP specifies what file type it is, and 21 | \fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported 22 | format. This file is normally found named ~/.ssh/known_hosts 23 | .SH RETURN VALUE 24 | Returns a negative value, a regular libssh2 error code for errors, or a 25 | positive number as number of parsed known hosts in the file. 26 | .SH AVAILABILITY 27 | Added in libssh2 1.2 28 | .SH SEE ALSO 29 | .BR libssh2_knownhost_init(3) 30 | .BR libssh2_knownhost_free(3) 31 | .BR libssh2_knownhost_check(3) 32 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_readline.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_readline 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_readline - read a known host line 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts, 12 | const char *line, size_t len, int type): 13 | .fi 14 | .SH DESCRIPTION 15 | Tell libssh2 to read a buffer as it if is a line from a known hosts file. 16 | 17 | \fIline\fP points to the start of the line 18 | 19 | \fIlen\fP is the length of the line in bytes 20 | 21 | \fItype\fP specifies what file type it is, and 22 | \fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported 23 | format. This file is normally found named ~/.ssh/known_hosts 24 | .SH RETURN VALUE 25 | Returns a regular libssh2 error code, where negative values are error codes 26 | and 0 indicates success. 27 | .SH AVAILABILITY 28 | Added in libssh2 1.2 29 | .SH SEE ALSO 30 | .BR libssh2_knownhost_get(3) 31 | .BR libssh2_knownhost_writeline(3) 32 | .BR libssh2_knownhost_readfile(3) 33 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_knownhost_writefile.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) Daniel Stenberg 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_knownhost_writefile 3 "28 May 2009" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_knownhost_writefile - write a collection of known hosts to a file 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_knownhost_writefile(LIBSSH2_KNOWNHOSTS *hosts, 12 | const char *filename, int type); 13 | .fi 14 | .SH DESCRIPTION 15 | Writes all the known hosts to the specified file using the specified file 16 | format. 17 | 18 | \fIfilename\fP specifies what filename to create 19 | 20 | \fItype\fP specifies what file type it is, and 21 | \fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported 22 | format. 23 | .SH RETURN VALUE 24 | Returns a regular libssh2 error code, where negative values are error codes 25 | and 0 indicates success. 26 | .SH AVAILABILITY 27 | Added in libssh2 1.2 28 | .SH SEE ALSO 29 | .BR libssh2_knownhost_readfile(3) 30 | .BR libssh2_knownhost_add(3) 31 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_poll.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_poll 3 "14 Dec 2006" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_poll - poll for activity on a socket, channel or listener 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_poll(LIBSSH2_POLLFD *fds, unsigned int nfds, long timeout); 12 | .fi 13 | .SH DESCRIPTION 14 | This function is deprecated. Do note use. We encourage users to instead use 15 | the \fIpoll(3)\fP or \fIselect(3)\fP functions to check for socket activity or 16 | when specific sockets are ready to get received from or send to. 17 | 18 | Poll for activity on a socket, channel, listener, or any combination of these 19 | three types. The calling semantics for this function generally match 20 | \fIpoll(2)\fP however the structure of fds is somewhat more complex in order 21 | to accommodate the disparate datatypes, POLLFD constants have been namespaced 22 | to avoid platform discrepancies, and revents has additional values defined. 23 | .SH "RETURN VALUE" 24 | Number of fds with interesting events. 25 | .SH SEE ALSO 26 | .BR libssh2_poll_channel_read(3) 27 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_poll_channel_read.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_poll_channel_read 3 "14 Dec 2006" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_poll_channel_read - check if data is available 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_poll_channel_read(LIBSSH2_CHANNEL *channel, int extended); 12 | .fi 13 | .SH DESCRIPTION 14 | This function is deprecated. Do note use. 15 | 16 | \fIlibssh2_poll_channel_read(3)\fP checks to see if data is available in the 17 | \fIchannel\fP's read buffer. No attempt is made with this method to see if 18 | packets are available to be processed. For full polling support, use 19 | \fIlibssh2_poll(3)\fP. 20 | .SH RETURN VALUE 21 | Returns 1 when data is available and 0 otherwise. 22 | .SH SEE ALSO 23 | .BR libssh2_poll(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_add.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_add 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_add - convenience macro for \fIlibssh2_publickey_add_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, 12 | const unsigned char *name, 13 | const unsigned char *blob, unsigned long blob_len, 14 | char overwrite, unsigned long num_attrs, 15 | const libssh2_publickey_attribute attrs[]); 16 | .fi 17 | .SH DESCRIPTION 18 | This is a macro defined in a public libssh2 header file that is using the 19 | underlying function \fIlibssh2_publickey_add_ex(3)\fP. 20 | .SH RETURN VALUE 21 | See \fIlibssh2_publickey_add_ex(3)\fP 22 | .SH ERRORS 23 | See \fIlibssh2_publickey_add_ex(3)\fP 24 | .SH SEE ALSO 25 | .BR libssh2_publickey_add_ex(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_add_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_add_ex 3 "1 Jun 2007" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_add_ex - Add a public key entry 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_publickey_add_ex(LIBSSH2_PUBLICKEY *pkey, 12 | const unsigned char *name, unsigned long name_len, 13 | const unsigned char *blob, unsigned long blob_len, 14 | char overwrite, unsigned long num_attrs, 15 | const libssh2_publickey_attribute attrs[]) 16 | .fi 17 | .SH DESCRIPTION 18 | TBD 19 | .SH RETURN VALUE 20 | Returns 0 on success, negative on failure. 21 | .SH ERRORS 22 | LIBSSH2_ERROR_BAD_USE 23 | LIBSSH2_ERROR_ALLOC, 24 | LIBSSH2_ERROR_EAGAIN 25 | LIBSSH2_ERROR_SOCKET_SEND, 26 | LIBSSH2_ERROR_SOCKET_TIMEOUT, 27 | LIBSSH2_ERROR_PUBLICKEY_PROTOCOL, 28 | .SH SEE ALSO 29 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_init.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_init 3 "1 Jun 2007" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_init - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH AVAILABILITY 13 | Added in libssh2 ?.?.? 14 | .SH SEE ALSO 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_list_fetch.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_list_fetch 3 "1 Jun 2007" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_list_fetch - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH AVAILABILITY 13 | Added in libssh2 ?.?.? 14 | .SH SEE ALSO 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_list_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_list_free 3 "1 Jun 2007" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_list_free - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH AVAILABILITY 13 | Added in libssh2 ?.?.? 14 | .SH SEE ALSO 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_remove.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_remove 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_remove - convenience macro for \fIlibssh2_publickey_remove_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, 12 | const unsigned char *name, unsigned long name_len, 13 | const unsigned char *blob, unsigned long blob_len); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_publickey_remove_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_publickey_remove_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_publickey_remove_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_publickey_remove_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_remove_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_list_remove_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_list_remove_ex - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH AVAILABILITY 13 | Added in libssh2 ?.?.? 14 | .SH SEE ALSO 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_publickey_shutdown.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_publickey_shutdown 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_publickey_shutdown - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH AVAILABILITY 13 | Added in libssh2 ?.?.? 14 | .SH SEE ALSO 15 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_scp_recv2.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_scp_recv2 3 "29 Jun 2015" "libssh2 1.6.1" "libssh2" 4 | .SH NAME 5 | libssh2_scp_recv2 - request a remote file via SCP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_CHANNEL * 11 | libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIsession\fP - Session instance as returned by 15 | .BR libssh2_session_init_ex(3) 16 | 17 | \fIpath\fP - Full path and filename of file to transfer. That is the remote 18 | file name. 19 | 20 | \fIsb\fP - Populated with remote file's size, mode, mtime, and atime 21 | 22 | Request a file from the remote host via SCP. 23 | .SH RETURN VALUE 24 | Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. 25 | .SH ERRORS 26 | \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. 27 | 28 | \fILIBSSH2_ERROR_SCP_PROTOCOL\fP - 29 | 30 | \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would 31 | block. 32 | .SH SEE ALSO 33 | .BR libssh2_session_init_ex(3) 34 | .BR libssh2_channel_open_ex(3) 35 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_scp_send.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_scp_send 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_scp_send - convenience macro for \fIlibssh2_scp_send_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_CHANNEL * 11 | libssh2_scp_send(LIBSSH2_SESSION *session, const char *path, 12 | int mode, size_t size); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_scp_send_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_scp_send_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_scp_send_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_scp_send_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_abstract.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_abstract 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_abstract - return a pointer to a session's abstract pointer 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void ** 11 | libssh2_session_abstract(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIsession\fP - Session instance as returned by 15 | .BR libssh2_session_init_ex(3) 16 | 17 | Return a pointer to where the abstract pointer provided to 18 | \fBlibssh2_session_init_ex(3)\fP is stored. By providing a doubly 19 | de-referenced pointer, the internal storage of the session instance may be 20 | modified in place. 21 | .SH RETURN VALUE 22 | A pointer to session internal storage whose contents point to previously 23 | provided abstract data. 24 | .SH SEE ALSO 25 | .BR libssh2_session_init_ex(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_banner_get.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_banner_get 3 "9 Sep 2011" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_session_banner_get - get the remote banner 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | const char * 11 | libssh2_session_banner_get(oLIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Once the session has been setup and \fIlibssh2_session_handshake(3)\fP has 15 | completed successfully, this function can be used to get the server id from 16 | the banner each server presents. 17 | .SH RETURN VALUE 18 | A pointer to a string or NULL if something failed. The data pointed to will be 19 | allocated and associated to the session handle and will be freed by libssh2 20 | when \fIlibssh2_session_free(3)\fP is used. 21 | .SH AVAILABILITY 22 | Added in 1.4.0 23 | .SH SEE ALSO 24 | .BR libssh2_session_banner_set(3), 25 | .BR libssh2_session_handshake(3), 26 | .BR libssh2_session_free(3) 27 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_callback_set.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_callback_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_callback_set - set a callback function 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void * 11 | libssh2_session_callback_set(LIBSSH2_SESSION *session, 12 | int cbtype, void *callback); 13 | .fi 14 | .SH DESCRIPTION 15 | This function is \fBDEPRECATED\fP in 1.11.1. Use the 16 | \fIlibssh2_session_callback_set2(3)\fP function instead! 17 | 18 | This implementation is expecting and returning a data pointer for callback 19 | functions. 20 | 21 | For the details about the replacement function, see 22 | .BR libssh2_session_callback_set2(3) 23 | which is expecting and returning a function pointer. 24 | 25 | .SH RETURN VALUE 26 | Pointer to previous callback handler. Returns NULL if no prior callback 27 | handler was set or the callback type was unknown. 28 | .SH SEE ALSO 29 | .BR libssh2_session_callback_set2(3) 30 | .BR libssh2_session_init_ex(3) 31 | .BR libssh2_agent_sign(3) 32 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_disconnect.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_disconnect 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_session_disconnect - convenience macro for \fIlibssh2_session_disconnect_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_session_disconnect_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_session_disconnect_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_session_disconnect_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_session_disconnect_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_flag.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_flag 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_flag - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_session_flag(LIBSSH2_SESSION *session, int flag, int value); 12 | .fi 13 | .SH DESCRIPTION 14 | Set options for the created session. \fIflag\fP is the option to set, while 15 | \fIvalue\fP is typically set to 1 or 0 to enable or disable the option. 16 | .SH FLAGS 17 | .IP LIBSSH2_FLAG_SIGPIPE 18 | If set, libssh2 will not attempt to block SIGPIPEs but will let them trigger 19 | from the underlying socket layer. 20 | .IP LIBSSH2_FLAG_COMPRESS 21 | If set - before the connection negotiation is performed - libssh2 will try to 22 | negotiate compression enabling for this connection. By default libssh2 will 23 | not attempt to use compression. 24 | .SH RETURN VALUE 25 | Returns regular libssh2 error code. 26 | .SH AVAILABILITY 27 | This function has existed since the age of dawn. LIBSSH2_FLAG_COMPRESS was 28 | added in version 1.2.8. 29 | .SH SEE ALSO 30 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_free.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_free 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_free - frees resources associated with a session instance 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_session_free(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Frees all resources associated with a session instance. Typically called after 15 | .BR libssh2_session_disconnect_ex(3) 16 | .SH RETURN VALUE 17 | Return 0 on success or negative on failure. It returns 18 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 19 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 20 | .SH SEE ALSO 21 | .BR libssh2_session_init_ex(3) 22 | .BR libssh2_session_disconnect_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_get_blocking.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_get_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_get_blocking - evaluate blocking mode on session 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_session_get_blocking(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Returns 0 if the state of the session has previously be set to non-blocking 15 | and it returns 1 if the state was set to blocking. 16 | .SH RETURN VALUE 17 | See description. 18 | .SH SEE ALSO 19 | .BR libssh2_session_set_blocking(3) 20 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_get_read_timeout.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_get_read_timeout 3 "13 Jan 2023" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_session_get_read_timeout - get the timeout for packet read functions 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | long 11 | libssh2_session_get_read_timeout(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Returns the \fBtimeout\fP (in seconds) for how long the ssh2 packet receive 15 | function calls may wait until they consider the situation an error and 16 | return LIBSSH2_ERROR_TIMEOUT. 17 | 18 | By default the timeout is 60 seconds. 19 | .SH RETURN VALUE 20 | The value of the timeout setting. 21 | .SH AVAILABILITY 22 | Added in 1.10.1 23 | .SH SEE ALSO 24 | .BR libssh2_session_set_read_timeout(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_get_timeout.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_get_timeout 3 "4 May 2011" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_session_get_timeout - get the timeout for blocking functions 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | long 11 | libssh2_session_get_timeout(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | Returns the \fBtimeout\fP (in milliseconds) for how long a blocking the 15 | libssh2 function calls may wait until they consider the situation an error and 16 | return LIBSSH2_ERROR_TIMEOUT. 17 | 18 | By default libssh2 has no timeout (zero) for blocking functions. 19 | .SH RETURN VALUE 20 | The value of the timeout setting. 21 | .SH AVAILABILITY 22 | Added in 1.2.9 23 | .SH SEE ALSO 24 | .BR libssh2_session_set_timeout(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_hostkey.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_hostkey 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_hostkey - get the remote key 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | const char * 11 | libssh2_session_hostkey(LIBSSH2_SESSION *session, 12 | size_t *len, int *type); 13 | .fi 14 | .SH DESCRIPTION 15 | Returns a pointer to the current host key, the value \fIlen\fP points to will 16 | get the length of the key. 17 | 18 | The value \fItype\fP points to the type of hostkey which is one of: 19 | LIBSSH2_HOSTKEY_TYPE_RSA, LIBSSH2_HOSTKEY_TYPE_DSS (deprecated), or 20 | LIBSSH2_HOSTKEY_TYPE_UNKNOWN. 21 | 22 | .SH RETURN VALUE 23 | A pointer, or NULL if something went wrong. 24 | .SH SEE ALSO 25 | .BR libssh2_knownhost_check(3) 26 | .BR libssh2_knownhost_add(3) 27 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_init.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_init 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_session_init - convenience macro for \fIlibssh2_session_init_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | LIBSSH2_SESSION * 11 | libssh2_session_init(void); 12 | .fi 13 | .SH DESCRIPTION 14 | This is a macro defined in a public libssh2 header file that is using the 15 | underlying function \fIlibssh2_session_init_ex(3)\fP. 16 | .SH RETURN VALUE 17 | See \fIlibssh2_session_init_ex(3)\fP 18 | .SH ERRORS 19 | See \fIlibssh2_session_init_ex(3)\fP 20 | .SH SEE ALSO 21 | .BR libssh2_session_init_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_last_errno.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_last_errno 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_session_last_errno - get the most recent error number 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_session_last_errno(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIsession\fP - Session instance as returned by 15 | .BR libssh2_session_init_ex(3) 16 | 17 | Determine the most recent error condition. 18 | .SH RETURN VALUE 19 | Numeric error code corresponding to the the Error Code constants. 20 | .SH SEE ALSO 21 | .BR libssh2_session_last_error(3) 22 | .BR libssh2_session_set_last_error(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_set_read_timeout.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_set_read_timeout 3 "13 Jan 2023" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_session_set_read_timeout - set timeout for packet read functions 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_session_set_read_timeout(LIBSSH2_SESSION *session, long timeout); 12 | .fi 13 | .SH DESCRIPTION 14 | Set the \fBtimeout\fP in seconds for how long libssh2 packet read 15 | function calls may wait until they consider the situation an error and return 16 | LIBSSH2_ERROR_TIMEOUT. 17 | 18 | By default or if you set the timeout to zero, the timeout will be set to 19 | 60 seconds. 20 | .SH RETURN VALUE 21 | Nothing 22 | .SH AVAILABILITY 23 | Added in 1.10.1 24 | .SH SEE ALSO 25 | .BR libssh2_session_get_read_timeout(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_session_set_timeout.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_session_set_timeout 3 "4 May 2011" "libssh2" "libssh2" 4 | .SH NAME 5 | libssh2_session_set_timeout - set timeout for blocking functions 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | void 11 | libssh2_session_set_timeout(LIBSSH2_SESSION *session, long timeout); 12 | .fi 13 | .SH DESCRIPTION 14 | Set the \fBtimeout\fP in milliseconds for how long a blocking the libssh2 15 | function calls may wait until they consider the situation an error and return 16 | LIBSSH2_ERROR_TIMEOUT. 17 | 18 | By default or if you set the timeout to zero, libssh2 has no timeout for 19 | blocking functions. 20 | .SH RETURN VALUE 21 | Nothing 22 | .SH AVAILABILITY 23 | Added in 1.2.9 24 | .SH SEE ALSO 25 | .BR libssh2_session_get_timeout(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_close.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_close 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_close - convenience macro for \fIlibssh2_sftp_close_handle(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_close_handle(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_close_handle(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_close_handle(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_close_handle(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_closedir.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_closedir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_closedir - convenience macro for \fIlibssh2_sftp_close_handle(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle) 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_close_handle(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_close_handle(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_close_handle(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_close_handle(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_fsetstat.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_fsetstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_fsetstat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_fsetstat(LIBSSH2_SFTP_HANDLE *handle, 13 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_fstat_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_fstat_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_fstat_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_fstat.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_fstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_fstat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_fstat(LIBSSH2_SFTP_HANDLE *handle, 13 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_fstat_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_fstat_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_fstat_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_fstatvfs.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .so man3/libssh2_sftp_statvfs.3 4 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_get_channel.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_get_channel 3 "9 Sep 2011" "libssh2 1.4.0" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_get_channel - return the channel of sftp 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | LIBSSH2_CHANNEL * 12 | libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp); 13 | .fi 14 | .SH DESCRIPTION 15 | \fIsftp\fP - SFTP instance as returned by 16 | .BR libssh2_sftp_init(3) 17 | 18 | Return the channel of the given sftp handle. 19 | .SH RETURN VALUE 20 | The channel of the SFTP instance or NULL if something was wrong. 21 | .SH AVAILABILITY 22 | Added in 1.4.0 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_init(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_last_error.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_last_error - return the last SFTP-specific error code 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | unsigned long 12 | libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); 13 | .fi 14 | .SH DESCRIPTION 15 | \fIsftp\fP - SFTP instance as returned by 16 | .BR libssh2_sftp_init(3) 17 | 18 | Returns the last error code produced by the SFTP layer. Note that this only 19 | returns a sensible error code if libssh2 returned LIBSSH2_ERROR_SFTP_PROTOCOL 20 | in a previous call. Using \fBlibssh2_sftp_last_error(3)\fP without a 21 | preceding SFTP protocol error, it will return an unspecified value. 22 | .SH RETURN VALUE 23 | Current error code state of the SFTP instance. 24 | .SH SEE ALSO 25 | .BR libssh2_sftp_init(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_lstat.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_lstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_lstat - convenience macro for \fIlibssh2_sftp_stat_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_lstat(LIBSSH2_SFTP *sftp, const char *path, 13 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_stat_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_stat_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_stat_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_stat_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_mkdir.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_mkdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_mkdir - convenience macro for \fIlibssh2_sftp_mkdir_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, 13 | long mode); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_mkdir_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_mkdir_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_mkdir_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_mkdir_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_open.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_open 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_open - convenience macro for \fIlibssh2_sftp_open_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | LIBSSH2_SFTP_HANDLE * 12 | libssh2_sftp_open(LIBSSH2_SFTP *sftp, const char *filename, 13 | unsigned long flags, 14 | long mode); 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_open_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_open_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_open_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_open_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_open_r.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_open_r 3 "10 Apr 2023" "libssh2 1.11.0" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_open_r - convenience macro for \fIlibssh2_sftp_open_ex_r(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | LIBSSH2_SFTP_HANDLE * 12 | libssh2_sftp_open_r(LIBSSH2_SFTP *sftp, const char *filename, 13 | unsigned long flags, 14 | long mode, 15 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 16 | .fi 17 | .SH DESCRIPTION 18 | This is a macro defined in a public libssh2 header file that is using the 19 | underlying function \fIlibssh2_sftp_open_ex_r(3)\fP. 20 | .SH RETURN VALUE 21 | See \fIlibssh2_sftp_open_ex_r(3)\fP 22 | .SH ERRORS 23 | See \fIlibssh2_sftp_open_ex_r(3)\fP 24 | .SH SEE ALSO 25 | .BR libssh2_sftp_open_ex_r(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_opendir.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_opendir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_opendir - convenience macro for \fIlibssh2_sftp_open_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | LIBSSH2_SFTP_HANDLE * 12 | libssh2_sftp_opendir(LIBSSH2_SFTP *sftp, const char *path); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_open_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_open_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_open_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_open_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_posix_rename.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_posix_rename 3 "9 May 2024" "libssh2 1.11.1" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_rename - convenience macro for \fIlibssh2_sftp_posix_rename_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_posix_rename(LIBSSH2_SFTP *sftp, 13 | const char *source_filename, 14 | const char *destination_filename); 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_posix_rename_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_posix_rename_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_posix_rename_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_posix_rename_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_readdir.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_readdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_readdir - convenience macro for \fIlibssh2_sftp_readdir_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_readdir(LIBSSH2_SFTP_HANDLE *handle, 13 | char *buffer, size_t buffer_maxlen, 14 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_readdir_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_readdir_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_readdir_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_readdir_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_readlink.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_readlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_readlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | #define libssh2_sftp_readlink(sftp, path, target, maxlen) \\ 12 | libssh2_sftp_symlink_ex((sftp), (path), strlen(path), \\ 13 | (target), (maxlen), \\ 14 | LIBSSH2_SFTP_READLINK) 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_symlink_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_symlink_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_symlink_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_realpath.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_realpath 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_realpath - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | #define libssh2_sftp_realpath(sftp, path, target, maxlen) \\ 12 | libssh2_sftp_symlink_ex((sftp), (path), strlen(path), \\ 13 | (target), (maxlen), \\ 14 | LIBSSH2_SFTP_REALPATH) 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_symlink_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_symlink_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_symlink_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_rename.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_rename 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_rename - convenience macro for \fIlibssh2_sftp_rename_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_rename(LIBSSH2_SFTP *sftp, 13 | const char *source_filename, 14 | const char *destination_filename); 15 | .fi 16 | .SH DESCRIPTION 17 | This is a macro defined in a public libssh2 header file that is using the 18 | underlying function \fIlibssh2_sftp_rename_ex(3)\fP. 19 | .SH RETURN VALUE 20 | See \fIlibssh2_sftp_rename_ex(3)\fP 21 | .SH ERRORS 22 | See \fIlibssh2_sftp_rename_ex(3)\fP 23 | .SH SEE ALSO 24 | .BR libssh2_sftp_rename_ex(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_rewind.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_rewind 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_rewind - convenience macro for \fIlibssh2_sftp_seek64(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_rewind(LIBSSH2_SFTP_HANDLE *handle); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_seek64(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_seek64(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_seek64(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_seek64(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_rmdir.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_rmdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_rmdir - convenience macro for \fIlibssh2_sftp_rmdir_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | #define libssh2_sftp_rmdir(sftp, path) \\ 12 | libssh2_sftp_rmdir_ex((sftp), (path), strlen(path)) 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_rmdir_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_rmdir_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_rmdir_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_rmdir_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_seek.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_seek 3 "22 Dec 2008" "libssh2 1.0" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_seek - set the read/write position indicator within a file 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | void 12 | libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, 13 | size_t offset); 14 | .fi 15 | .SH DESCRIPTION 16 | Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead! 17 | 18 | \fIhandle\fP - SFTP File Handle as returned by 19 | .BR libssh2_sftp_open_ex(3) 20 | 21 | \fIoffset\fP - Number of bytes from the beginning of file to seek to. 22 | 23 | Move the file handle's internal pointer to an arbitrary location. 24 | Note that libssh2 implements file pointers as a localized concept to make 25 | file access appear more POSIX like. No packets are exchanged with the server 26 | during a seek operation. The localized file pointer is used as a convenience 27 | offset during read/write operations. 28 | .SH SEE ALSO 29 | .BR libssh2_sftp_open_ex(3), 30 | .BR libssh2_sftp_seek64(3) 31 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_setstat.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_setstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_setstat - convenience macro for \fIlibssh2_sftp_stat_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_setstat(LIBSSH2_SFTP *sftp, const char *path, 13 | LIBSSH2_SFTP_ATTRIBUTES *attr); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_stat_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_stat_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_stat_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_stat_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_shutdown.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_shutdown 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_shutdown - shut down an SFTP session 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); 13 | .fi 14 | .SH DESCRIPTION 15 | \fIsftp\fP - SFTP instance as returned by 16 | .BR libssh2_sftp_init(3) 17 | 18 | Destroys a previously initialized SFTP session and frees all resources 19 | associated with it. 20 | .SH RETURN VALUE 21 | Return 0 on success or negative on failure. It returns 22 | LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 23 | LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 24 | .SH SEE ALSO 25 | .BR libssh2_sftp_init(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_stat.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_stat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_stat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_stat(LIBSSH2_SFTP *sftp, const char *path, 13 | LIBSSH2_SFTP_ATTRIBUTES *attrs); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_fstat_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_fstat_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_fstat_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_symlink.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_symlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_symlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | #define libssh2_sftp_symlink(sftp, orig, linkpath) \\ 12 | libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \\ 13 | strlen(linkpath), LIBSSH2_SFTP_SYMLINK) 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_sftp_symlink_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_sftp_symlink_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_symlink_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_tell.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_tell 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_tell - get the current read/write position indicator for a file 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | size_t 12 | libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); 13 | .fi 14 | .SH DESCRIPTION 15 | \fIhandle\fP - SFTP File Handle as returned by \fBlibssh2_sftp_open_ex(3)\fP. 16 | 17 | Returns the current offset of the file handle's internal pointer. Note that 18 | this is now deprecated. Use the newer \fBlibssh2_sftp_tell64(3)\fP instead! 19 | .SH RETURN VALUE 20 | Current offset from beginning of file in bytes. 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_open_ex(3), 23 | .BR libssh2_sftp_tell64(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_tell64.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_tell64 3 "22 Dec 2008" "libssh2 1.0" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_tell64 - get the current read/write position indicator for a file 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | libssh2_uint64_t 12 | libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE *handle); 13 | .fi 14 | .SH DESCRIPTION 15 | \fIhandle\fP - SFTP File Handle as returned by \fBlibssh2_sftp_open_ex(3)\fP 16 | 17 | Identify the current offset of the file handle's internal pointer. 18 | .SH RETURN VALUE 19 | Current offset from beginning of file in bytes. 20 | .SH AVAILABILITY 21 | Added in libssh2 1.0 22 | .SH SEE ALSO 23 | .BR libssh2_sftp_open_ex(3), 24 | .BR libssh2_sftp_tell(3) 25 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_sftp_unlink.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_sftp_unlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_sftp_unlink - convenience macro for \fIlibssh2_sftp_unlink_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | #include 10 | 11 | int 12 | libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename); 13 | .fi 14 | .SH DESCRIPTION 15 | This is a macro defined in a public libssh2 header file that is using the 16 | underlying function \fIlibssh2_sftp_unlink_ex(3)\fP. 17 | .SH RETURN VALUE 18 | See \fIlibssh2_sftp_unlink_ex(3)\fP 19 | .SH ERRORS 20 | See \fIlibssh2_sftp_unlink_ex(3)\fP 21 | .SH SEE ALSO 22 | .BR libssh2_sftp_unlink_ex(3) 23 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_authenticated.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_authenticated 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_authenticated - return authentication status 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_authenticated(LIBSSH2_SESSION *session); 12 | .fi 13 | .SH DESCRIPTION 14 | \fIsession\fP - Session instance as returned by 15 | .BR libssh2_session_init_ex(3) 16 | 17 | Indicates whether or not the named session has been successfully authenticated. 18 | .SH RETURN VALUE 19 | Returns 1 if authenticated and 0 if not. 20 | .SH SEE ALSO 21 | .BR libssh2_session_init_ex(3) 22 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_hostbased_fromfile.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_hostbased_fromfile 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_hostbased_fromfile - convenience macro for \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_hostbased_fromfile(LIBSSH2_SESSION *session, 12 | const char *username, 13 | const char *publickey, 14 | const char *privatekey, 15 | const char *passphrase, 16 | const char *hostname); 17 | .fi 18 | .SH DESCRIPTION 19 | This is a macro defined in a public libssh2 header file that is using the 20 | underlying function \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP. 21 | .SH RETURN VALUE 22 | See \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP 23 | .SH ERRORS 24 | See \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP 25 | .SH SEE ALSO 26 | .BR libssh2_userauth_hostbased_fromfile_ex(3) 27 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_hostbased_fromfile_ex.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_hostbased_fromfile_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_hostbased_fromfile_ex - TODO 6 | .SH SYNOPSIS 7 | .nf 8 | .fi 9 | .SH DESCRIPTION 10 | .SH RETURN VALUE 11 | .SH ERRORS 12 | .SH SEE ALSO 13 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_keyboard_interactive.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_keyboard_interactive 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_keyboard_interactive - convenience macro for \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_keyboard_interactive(LIBSSH2_SESSION* session, 12 | const char *username, 13 | LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC((*response_callback))); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_userauth_keyboard_interactive_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_password.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_password 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_password - convenience macro for \fIlibssh2_userauth_password_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_password(LIBSSH2_SESSION *session, 12 | const char *username, 13 | const char *password); 14 | .fi 15 | .SH DESCRIPTION 16 | This is a macro defined in a public libssh2 header file that is using the 17 | underlying function \fIlibssh2_userauth_password_ex(3)\fP. 18 | .SH RETURN VALUE 19 | See \fIlibssh2_userauth_password_ex(3)\fP 20 | .SH ERRORS 21 | See \fIlibssh2_userauth_password_ex(3)\fP 22 | .SH SEE ALSO 23 | .BR libssh2_userauth_password_ex(3) 24 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_publickey.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_publickey 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_publickey - authenticate using a callback function 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_publickey(LIBSSH2_SESSION *session, 12 | const char *user, 13 | const unsigned char *pubkeydata, 14 | size_t pubkeydata_len, 15 | sign_callback, 16 | void **abstract); 17 | .fi 18 | .SH DESCRIPTION 19 | Authenticate with the \fIsign_callback\fP callback that matches the prototype 20 | below 21 | .SH CALLBACK 22 | .nf 23 | int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, 24 | const unsigned char *data, size_t data_len, void **abstract); 25 | .fi 26 | 27 | This function gets called... 28 | .SH RETURN VALUE 29 | Return 0 on success or negative on failure. 30 | .SH SEE ALSO 31 | .BR libssh2_userauth_publickey_fromfile_ex(3) 32 | -------------------------------------------------------------------------------- /libssh2/docs/libssh2_userauth_publickey_fromfile.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) The libssh2 project and its contributors. 2 | .\" SPDX-License-Identifier: BSD-3-Clause 3 | .TH libssh2_userauth_publickey_fromfile 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" 4 | .SH NAME 5 | libssh2_userauth_publickey_fromfile - convenience macro for \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP calls 6 | .SH SYNOPSIS 7 | .nf 8 | #include 9 | 10 | int 11 | libssh2_userauth_publickey_fromfile(LIBSSH2_SESSION *session, 12 | const char *username, 13 | const char *publickey, 14 | const char *privatekey, 15 | const char *passphrase); 16 | .fi 17 | .SH DESCRIPTION 18 | This is a macro defined in a public libssh2 header file that is using the 19 | underlying function \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP. 20 | .SH RETURN VALUE 21 | See \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP 22 | .SH ERRORS 23 | See \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP 24 | .SH SEE ALSO 25 | .BR libssh2_userauth_publickey_fromfile_ex(3) 26 | -------------------------------------------------------------------------------- /libssh2/docs/template.3: -------------------------------------------------------------------------------- 1 | .TH libssh2_template 3 "1 Jun 2022" "libssh2" "libssh2" 2 | .SH NAME 3 | libssh2_template - short function description 4 | .SH SYNOPSIS 5 | .nf 6 | #include 7 | 8 | void 9 | libssh2_template(void); 10 | .fi 11 | .SH DESCRIPTION 12 | Long text describing the function and its input arguments. 13 | .SH RETURN VALUE 14 | Describe what the function returns. 15 | .SH ERRORS 16 | Add error codes 17 | .SH AVAILABILITY 18 | Added in libssh2 ?.?.? 19 | .SH SEE ALSO 20 | Add related functions 21 | -------------------------------------------------------------------------------- /libssh2/example/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (C) The libssh2 project and its contributors. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | AUTOMAKE_OPTIONS = foreign nostdinc 4 | 5 | EXTRA_DIST = CMakeLists.txt 6 | 7 | # Get noing_PROGRAMS 8 | include Makefile.inc 9 | 10 | AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/include 11 | LDADD = $(top_builddir)/src/libssh2.la 12 | 13 | # This might hold -Werror 14 | AM_CFLAGS = @LIBSSH2_CFLAG_EXTRAS@ 15 | -------------------------------------------------------------------------------- /libssh2/example/Makefile.inc: -------------------------------------------------------------------------------- 1 | # Copyright (C) The libssh2 project and its contributors. 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | noinst_PROGRAMS = \ 5 | direct_tcpip \ 6 | scp \ 7 | scp_nonblock \ 8 | scp_write \ 9 | scp_write_nonblock \ 10 | sftp \ 11 | sftp_RW_nonblock \ 12 | sftp_append \ 13 | sftp_mkdir \ 14 | sftp_mkdir_nonblock \ 15 | sftp_nonblock \ 16 | sftp_write \ 17 | sftp_write_nonblock \ 18 | sftp_write_sliding \ 19 | sftpdir \ 20 | sftpdir_nonblock \ 21 | ssh2 \ 22 | ssh2_agent \ 23 | ssh2_agent_forwarding \ 24 | ssh2_echo \ 25 | ssh2_exec \ 26 | subsystem_netconf \ 27 | tcpip-forward \ 28 | x11 29 | -------------------------------------------------------------------------------- /libssh2/get_ver.awk: -------------------------------------------------------------------------------- 1 | # fetch libssh2 version number from input file and write them to STDOUT 2 | # Copyright (C) The libssh2 project and its contributors. 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | BEGIN { 6 | while ((getline < ARGV[1]) > 0) { 7 | if (match ($0, /^#define LIBSSH2_COPYRIGHT "[^"]+"$/)) { 8 | my_copyright_str = substr($0, 28, length($0)-28); 9 | } 10 | else if (match ($0, /^#define LIBSSH2_VERSION[ |\t]+"[^"]+"/)) { 11 | my_ver_str = substr($3, 2, length($3) - 2); 12 | split(my_ver_str, v, "."); 13 | if (v[3]) 14 | gsub("[^0-9].*$", "", v[3]); 15 | else 16 | v[3] = 0; 17 | if (v[2]) 18 | gsub("[^0-9].*$", "", v[2]); 19 | else 20 | v[2] = 0; 21 | my_ver = v[1] "," v[2] "," v[3]; 22 | } 23 | } 24 | print "LIBSSH2_VERSION = " my_ver ""; 25 | print "LIBSSH2_VERSION_STR = " my_ver_str ""; 26 | print "LIBSSH2_COPYRIGHT_STR = " my_copyright_str ""; 27 | } 28 | -------------------------------------------------------------------------------- /libssh2/libssh2.pc.in: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # libssh2 installation details 3 | # 4 | # Copyright (C) The libssh2 project and its contributors. 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | ########################################################################### 7 | 8 | prefix=@prefix@ 9 | exec_prefix=@exec_prefix@ 10 | libdir=@libdir@ 11 | includedir=@includedir@ 12 | 13 | Name: libssh2 14 | URL: https://libssh2.org/ 15 | Description: Library for SSH-based communication 16 | Version: @LIBSSH2_VERSION@ 17 | Requires: @LIBSSH2_PC_REQUIRES@ 18 | Requires.private: @LIBSSH2_PC_REQUIRES_PRIVATE@ 19 | Libs: -L${libdir} -lssh2 @LIBSSH2_PC_LIBS@ 20 | Libs.private: @LIBSSH2_PC_LIBS_PRIVATE@ 21 | Cflags: -I${includedir} 22 | -------------------------------------------------------------------------------- /libssh2/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 4 | # Inc. 5 | # Written by Scott James Remnant, 2004 6 | # 7 | # This file is free software; the Free Software Foundation gives 8 | # unlimited permission to copy and/or distribute it, with or without 9 | # modifications, as long as this notice is preserved. 10 | 11 | # @configure_input@ 12 | 13 | # serial 4245 ltversion.m4 14 | # This file is part of GNU Libtool 15 | 16 | m4_define([LT_PACKAGE_VERSION], [2.4.7]) 17 | m4_define([LT_PACKAGE_REVISION], [2.4.7]) 18 | 19 | AC_DEFUN([LTVERSION_VERSION], 20 | [macro_version='2.4.7' 21 | macro_revision='2.4.7' 22 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 23 | _LT_DECL(, macro_revision, 0) 24 | ]) 25 | -------------------------------------------------------------------------------- /libssh2/src/chacha.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: chacha.h,v 1.4 2016/08/27 04:04:56 guenther Exp $ */ 2 | 3 | /* 4 | * chacha-merged.c version 20080118 5 | * D. J. Bernstein 6 | * Public domain. 7 | * Copyright not intended 2024. 8 | * 9 | * SPDX-License-Identifier: SAX-PD-2.0 10 | */ 11 | 12 | #ifndef CHACHA_H 13 | #define CHACHA_H 14 | 15 | #include 16 | 17 | struct chacha_ctx { 18 | u_int input[16]; 19 | }; 20 | 21 | #define CHACHA_MINKEYLEN 16 22 | #define CHACHA_NONCELEN 8 23 | #define CHACHA_CTRLEN 8 24 | #define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN) 25 | #define CHACHA_BLOCKLEN 64 26 | 27 | void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits); 28 | void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv, const u_char *ctr); 29 | void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m, 30 | u_char *c, u_int bytes); 31 | 32 | #endif /* CHACHA_H */ 33 | 34 | -------------------------------------------------------------------------------- /libssh2/src/crypto.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) Viktor Szakats 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #define LIBSSH2_CRYPTO_C 7 | #include "libssh2_priv.h" 8 | 9 | #if defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL) 10 | #include "openssl.c" 11 | #elif defined(LIBSSH2_LIBGCRYPT) 12 | #include "libgcrypt.c" 13 | #elif defined(LIBSSH2_MBEDTLS) 14 | #include "mbedtls.c" 15 | #elif defined(LIBSSH2_OS400QC3) 16 | #include "os400qc3.c" 17 | #elif defined(LIBSSH2_WINCNG) 18 | #include "wincng.c" 19 | #endif 20 | -------------------------------------------------------------------------------- /libssh2/src/poly1305.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: poly1305.h,v 1.4 2014/05/02 03:27:54 djm Exp $ */ 2 | 3 | /* 4 | * Public Domain poly1305 from Andrew Moon 5 | * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna 6 | * Copyright not intended 2024. 7 | * 8 | * SPDX-License-Identifier: SAX-PD-2.0 9 | */ 10 | 11 | #ifndef POLY1305_H 12 | #define POLY1305_H 13 | 14 | #define POLY1305_KEYLEN 32 15 | #define POLY1305_TAGLEN 16 16 | 17 | void poly1305_auth(u_char out[POLY1305_TAGLEN], const u_char *m, size_t inlen, 18 | const u_char key[POLY1305_KEYLEN]); 19 | 20 | #endif /* POLY1305_H */ 21 | -------------------------------------------------------------------------------- /libssh2/tests/key_dsa: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PRIVATE KEY----- 2 | MIIBvAIBAAKBgQCtiYdgpPvFtfi7Ba44DiB+1x8kojjT0nRvn2hU2aa4p4fXI8kd 3 | 6Hc57VQO/lLhR9eFpxjP7m+jGwF468Q6NU8xiC71ucep0OoXS7u8RcoIoWfLDtZi 4 | DDlahnZTW04mB5fFxo2y7dYl31vE4TPdSxhqpkvnIBIstMFh2M7Dl0w8/QIVAP95 5 | u6dg1OW6gGsRgiircsy1A9tzAoGBAIzwc5FCnJnzAJm9Hjv0AFV5l/i/DQulZ9pu 6 | EILkNiHCfDR+lTJ8VxAR7J3pgjmvYzeeRvi519ez1YriktDt66kIknQOcHB8ghyg 7 | U+dff79SkDcpg8LnX5xb3cVMgABujA0sSpaW1wwm64RXdvmoQvWu6ympUT0l0dEd 8 | oYVkb4ytAoGAJ+CGwV/1S4j1GVwa6pSP0nj4V86GWXosTTBg7GT+rKWu8lrxIcr6 9 | FzLWgFi/gHoMrgnKWGxO1yF7vkoYM5Yfo84oBYiH+MgpiBuOrZrgzacHsA66JJbU 10 | frESRFWZl2blIPr6Gyjj6cVGgMabK3yCiTRi0v7hwffpm0rKyKv7GooCFQCyaA6T 11 | tkJunHP+F0Xg/WAUV6tcqA== 12 | -----END DSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /libssh2/tests/key_dsa.pub: -------------------------------------------------------------------------------- 1 | ssh-dss AAAAB3NzaC1kc3MAAACBAK2Jh2Ck+8W1+LsFrjgOIH7XHySiONPSdG+faFTZprinh9cjyR3odzntVA7+UuFH14WnGM/ub6MbAXjrxDo1TzGILvW5x6nQ6hdLu7xFygihZ8sO1mIMOVqGdlNbTiYHl8XGjbLt1iXfW8ThM91LGGqmS+cgEiy0wWHYzsOXTDz9AAAAFQD/ebunYNTluoBrEYIoq3LMtQPbcwAAAIEAjPBzkUKcmfMAmb0eO/QAVXmX+L8NC6Vn2m4QguQ2IcJ8NH6VMnxXEBHsnemCOa9jN55G+LnX17PViuKS0O3rqQiSdA5wcHyCHKBT519/v1KQNymDwudfnFvdxUyAAG6MDSxKlpbXDCbrhFd2+ahC9a7rKalRPSXR0R2hhWRvjK0AAACAJ+CGwV/1S4j1GVwa6pSP0nj4V86GWXosTTBg7GT+rKWu8lrxIcr6FzLWgFi/gHoMrgnKWGxO1yF7vkoYM5Yfo84oBYiH+MgpiBuOrZrgzacHsA66JJbUfrESRFWZl2blIPr6Gyjj6cVGgMabK3yCiTRi0v7hwffpm0rKyKv7Goo= awl03@bounty 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_dsa_wrong: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PRIVATE KEY----- 2 | MIIBuwIBAAKBgQCE1v/lL1VvjlJMyG7q0wAgl2tqVMzy5h1RVOtDS8bTlXLJg7ks 3 | T63wTmXlp2HedgKkfHCu7AKsjPyg1CTrvRBa8BFEvMoUDARonMwql34aiKVMy/t0 4 | /ehnmCQV+ZMFpsVFnphJpZuXLTW1F3pnEbSNud5sACjbWb51uly5AUynuwIVAOhj 5 | rbNOaAtC1oYki8CVwpkQ8rHhAoGAYSepXRF3GJSjseYgJ2bCgcJS0L9agcvKAf+F 6 | dc+ZDJOchhnZC/hGHsjAfg62KowwKuOYsbcR3S4LJxiERcmRabww+kUIL1E8bLaQ 7 | RbOygNsHU8LyBdSx3WqC2WEOpVkTAjYDWTkbN+qkb53IBoI0GwFt5P9GHvQcAGkj 8 | GJQAWWYCgYAt7vxpDC5Xs6GxbaUupfIP95ZTMx2LqqFjqfT/81nypIHVyIlCnWMi 9 | a0mWGe4qXmHSyk6ZYnsk7Ll6WxdwUrFhd75qERyXlRK2x/v/Q3h9IOwChpHdSFx/ 10 | Tq1Zl9vMx3tmS1H0YF9tUdN7g8S5XTUSvYA+0Lzxs/9zOU5fa55+pAIVAKV45RLf 11 | hg2GNXvO68Q4tt3F6kSP 12 | -----END DSA PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /libssh2/tests/key_dsa_wrong.pub: -------------------------------------------------------------------------------- 1 | ssh-dss AAAAB3NzaC1kc3MAAACBAITW/+UvVW+OUkzIburTACCXa2pUzPLmHVFU60NLxtOVcsmDuSxPrfBOZeWnYd52AqR8cK7sAqyM/KDUJOu9EFrwEUS8yhQMBGiczCqXfhqIpUzL+3T96GeYJBX5kwWmxUWemEmlm5ctNbUXemcRtI253mwAKNtZvnW6XLkBTKe7AAAAFQDoY62zTmgLQtaGJIvAlcKZEPKx4QAAAIBhJ6ldEXcYlKOx5iAnZsKBwlLQv1qBy8oB/4V1z5kMk5yGGdkL+EYeyMB+DrYqjDAq45ixtxHdLgsnGIRFyZFpvDD6RQgvUTxstpBFs7KA2wdTwvIF1LHdaoLZYQ6lWRMCNgNZORs36qRvncgGgjQbAW3k/0Ye9BwAaSMYlABZZgAAAIAt7vxpDC5Xs6GxbaUupfIP95ZTMx2LqqFjqfT/81nypIHVyIlCnWMia0mWGe4qXmHSyk6ZYnsk7Ll6WxdwUrFhd75qERyXlRK2x/v/Q3h9IOwChpHdSFx/Tq1Zl9vMx3tmS1H0YF9tUdN7g8S5XTUSvYA+0Lzxs/9zOU5fa55+pA== awl03@bounty 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_ecdsa: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAiAAAABNlY2RzYS 3 | 1zaGEyLW5pc3RwMzg0AAAACG5pc3RwMzg0AAAAYQTosiScH/oRSazpIpPSEFcY4YVZyNby 4 | peARi49N3qy78OE118KGc5T8eifd+n1PSb7z8PnfDwOL4jBHxW5nWx0RCocIt7tb2a349J 5 | gfEl8PegHGcF/DwC+eesIKJvv0MfkAAADIKLgw6yi4MOsAAAATZWNkc2Etc2hhMi1uaXN0 6 | cDM4NAAAAAhuaXN0cDM4NAAAAGEE6LIknB/6EUms6SKT0hBXGOGFWcjW8qXgEYuPTd6su/ 7 | DhNdfChnOU/Hon3fp9T0m+8/D53w8Di+IwR8VuZ1sdEQqHCLe7W9mt+PSYHxJfD3oBxnBf 8 | w8AvnnrCCib79DH5AAAAMGYdHu+u2/L8zC/0S9bao9y6vKiLSuTEfZpCIsyE5jWj/vrS0n 9 | r1lzv9kKj+5A86aQAAAAA= 10 | -----END OPENSSH PRIVATE KEY----- 11 | -------------------------------------------------------------------------------- /libssh2/tests/key_ecdsa.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBOiyJJwf+hFJrOkik9IQVxjhhVnI1vKl4BGLj03erLvw4TXXwoZzlPx6J936fU9JvvPw+d8PA4viMEfFbmdbHREKhwi3u1vZrfj0mB8SXw96AcZwX8PAL556wgom+/Qx+Q== 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_ecdsa_signed: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAiAAAABNlY2RzYS 3 | 1zaGEyLW5pc3RwMzg0AAAACG5pc3RwMzg0AAAAYQRv1/fnN1SuIkg222jYnySqIJ88J5M3 4 | bB6JGeloKhIvnZdPOSVFuFBjuF7NPrGrsm87QstQFbDiLhIlcDNHIq0VhS5itHNMjtC6Ym 5 | RRx7mlQSXPbRRF5MclxvDJCMyAIagAAADQekojnXpKI50AAAATZWNkc2Etc2hhMi1uaXN0 6 | cDM4NAAAAAhuaXN0cDM4NAAAAGEEb9f35zdUriJINtto2J8kqiCfPCeTN2weiRnpaCoSL5 7 | 2XTzklRbhQY7hezT6xq7JvO0LLUBWw4i4SJXAzRyKtFYUuYrRzTI7QumJkUce5pUElz20U 8 | ReTHJcbwyQjMgCGoAAAAMQDmng9vaqXjHAhRssuBHeQylRKRwzOYOaToF8f+O0NmpmfLnc 9 | /c2wOcXf2f9GBAQdYAAAAAAQIDBAUGBw== 10 | -----END OPENSSH PRIVATE KEY----- 11 | -------------------------------------------------------------------------------- /libssh2/tests/key_ecdsa_signed-cert.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp384-cert-v01@openssh.com AAAAKGVjZHNhLXNoYTItbmlzdHAzODQtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgQCXc1JaqZ4XzkudbzP/pgEUbkioo7pl9aB09h6sg7KYAAAAIbmlzdHAzODQAAABhBG/X9+c3VK4iSDbbaNifJKognzwnkzdsHokZ6WgqEi+dl085JUW4UGO4Xs0+sauybztCy1AVsOIuEiVwM0cirRWFLmK0c0yO0LpiZFHHuaVBJc9tFEXkxyXG8MkIzIAhqAAAAAAAAAABAAAAAQAAAAhpZGVudGl0eQAAAAsAAAAHbGlic3NoMgAAAAAAAAAA//////////8AAAAAAAAAggAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAAArAAAABNlY2RzYS1zaGEyLW5pc3RwNTIxAAAACG5pc3RwNTIxAAAAhQQAfv15s+G2xg56J+audKAM4G9qOTFrbZRo0CTwvkb/oHrf9/2RSWqYsx/0m5mYCZVlecnZqwRHAOolXbc/Yb4cGjsALUj3UDirsnYR7Ve+SwnunkpvW/H3a98sA3sS+HCpd5RbpfWClSBOI9JEAlPtS1CrEQ7EmO7hmlFOH2cL0qfHCyYAAACnAAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAACMAAAAQgGxnhh8z8LNk5pMw0D9InyEtVRm8OJi23XEhqj/ieT/BsLZXbu65UAcMjrUn6DPdERxF9Dwe9pdIAWOLLjLHYEFBQAAAEIAlxz+XjUKa9Q2vpH0y8IgJMm0H1hTBUM1DQEoL8No1BVtgtIO20mac2fE3I35JxNDmmXoW+FuzmJnyrY9rxY+YXM= key_ecdsa_signed.pub 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_ecdsa_signed.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBG/X9+c3VK4iSDbbaNifJKognzwnkzdsHokZ6WgqEi+dl085JUW4UGO4Xs0+sauybztCy1AVsOIuEiVwM0cirRWFLmK0c0yO0LpiZFHHuaVBJc9tFEXkxyXG8MkIzIAhqA== key_ecdsa_signed 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_ed25519: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW 3 | QyNTUxOQAAACBRINCCN823NclhoUcyHOSsE0ZZsddEUD9LEut/taDD4gAAAJDgVkFO4FZB 4 | TgAAAAtzc2gtZWQyNTUxOQAAACBRINCCN823NclhoUcyHOSsE0ZZsddEUD9LEut/taDD4g 5 | AAAECD4khMmQkiGtn/wwcwqKNRo3oCetwMOOlhli8S8So8OVEg0II3zbc1yWGhRzIc5KwT 6 | Rlmx10RQP0sS63+1oMPiAAAAC2tleV9lZDI1NTE5AQI= 7 | -----END OPENSSH PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /libssh2/tests/key_ed25519.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFEg0II3zbc1yWGhRzIc5KwTRlmx10RQP0sS63+1oMPi key_ed25519 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_ed25519_encrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABD4qdu8J/ 3 | EAqXFQERrvzMerAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAICHxEyUTOVHXvdMF 4 | ARedFQ+H9DW/n8Zy3daKKRqnTDMqAAAAoO05oxXUkLz8cMQcMeeRSc4UvsaWnCvfN4Qm15 5 | NaVwSjb/09AcGGVeF1xxwPEIjwsIRftAjjgLuauI6XpXzyeDOlr2HnwzgpZtmeaHzbB7lS 6 | NjpSENP+fXipXinSfgZqGOItPbbismEVWX4sQn/Zla6/f/JAcDV60TK2ZhVEZ5072t0NcA 7 | eZQeSzBnpoRhlB7IDO7/7pmu1kNysUzH94Bw8= 8 | -----END OPENSSH PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /libssh2/tests/key_ed25519_encrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICHxEyUTOVHXvdMFARedFQ+H9DW/n8Zy3daKKRqnTDMq 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnak1T7zHJ+hVRFBDQ9pf1KVzmd5gaNc7y7NPmL13aOG3sYeJevi1x1WM/R3tb8XnUnzZUX9GJN0MYovvZsw9bknG1mDP72LFbGp/gzPddGIKHBBpvceDaJ85sM/ME3XOtD7uuXQuNAuEHwEzSMMiSIEMcQS+lXIcMLr5xPLEkyNvqsO5RqSjMTLHKHgY8gLWx7oQ1avokhwuDxF7P3Pqtj+rW2Te6vR0i1H6EyFPsBkzkgNXb33cus8M1CnTmYTSgJgmHO2LLcGpjQ5sL8T/PWIWHaSqTnkrFXEMysgoteXnAYILjzyBaqq2WV4KA3TluGdAP2p8gC32QtKmIuis3Q== awl03@bounty 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa_aes256gcm.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD+1l4u2KtpvsP2EpioqgHjfirT7IIQOQfCsjZCppmLUcPE1/qCC7krqjzaQ3nuKlVEc/pKJrti2oc0tBDp6zzr8pPkmzdMtpjP84RkJZwu6eVZyZqQrjpmwjw7IWVbGoxkKFpWS2ndxCzhoD/F+TW2NcjpwFN53Ktq0SdHVUXU00RlzUiKNTdzanb8vyF3m+PGwIWPX92E2t/31WxRVXwybTdpXSzyz9IIjxMkrSRVa8XzX0EyUzETuiAeU94AWJX5Gu/pFJT6E7VEMQudeN4iI75WYGxrYU1HCOTnsYk/9LCdM7O6ntJIlzul3CwXsD6+B35hu5AJb91RNbHYWUz key_rsa_aes256gcm 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa_encrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC92YlGoc4PJy6DzX916JJZhxkvmkWBLGJdWOL7R9B6iaYEKebBxzTE3P1RcnxnuI06kklVq/KcDP9sLlgawTZcDg7ifM7HncPOi18OON8vvVVzodikHzuupjhpI5YTT9wwV2fDVi2URsBjvX4AFiZ5WM3/NwqdKpYABzWieBikXGJ58Tsnw+zQw2qMmKKESBuzSN538loTAj5iEH/GAKYDbbH9t2a17qhNCNEw4vrtURT9JqwO1cOg7N1OKpmqCPEbK0wuSTljNC230VJ06X/8UqahWWSH6MreGy6gwpPi6i9wFiFLur301R0dTPiKVhz6bguhcC1EAlhSgjfelFJt awl03@bounty 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa_openssh.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTe1lN2L/yet0Ma1JzXkQf3t1f+pauALec2FsGZy87KRJW1AOxcTTiePjlFwP1yfSK1lWXQ+uf0b61gkKqqR52FDky24HJWuYlfXlEQMn2d/PNDNVDDbO4TXKyNxxUHFJ6qYMNd4kWjOH+6rmYoWKsWV+3mDRbHagbVPEYL8wep8OTqKOqruVLVPzZyYZkBtn4XOFi6UE8WKiSVdK1Am1O5UxvlD95t32eYch6wQ9azgMqja6spe/L5UJgP83QZFknVC3wPZWkjqomVFql0FpaQclENwyY/OZMxr0cT/f7bCL6s4A/1XpbsGmC0xak4/THHbOn+0LdIej2nGV8JFoR 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa_sha2_256_signed.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCp0vxjWDhHiT2u0j7Eor+iLjqfGvx0tGNu//VKW/sLKPnRiR+Ate4adBPSDxrQ6tEkrwQEn48FnUknoXMDum87XRK5hu4b7ukizI9PXHk/dh4J70WAVVB3sTukSKy7/V06EdwDsMtG02l20aVdBcDeGVkMWT4OX/aKhKoxljm4OUsx6/JMVHScQA7BPdVuC+RnN64RQMKLAHPNzIpwR6wdO+lRTZajz9nekcldm+YF7bac7aNUYwEilMriFYgLvvr7QV5W2diZDVRzk2G+6avCYfCCo49P24NJv86ab+S1GsvQkFsTfaTWLKxpAc5A6juRTtvLTBy7ko/XrtRWzJJnhcpSMiYSmyYMqHr6oDR4bnHs2r8nwoUUDfdz9hgnjR2clBkkDjju8MVkcWlD4atZCq2EdHCMPbHsoaRkVrJ4vwYOjuUtzwGxwLzWliBWZTAS4DI1moJX+pCmDshxnIih1TZl+wcUPJgLHIog7cqb7g3GG3AXCrb0eltAI5D7hubuRY6DinUD1moAyjP35QjKwVVPlK0IbF75fCNfIwbTorYZuKh4Fd0bW8DY2/Ev1oH48n1fJvYzI6cywTWl96bzQRYR3kAu1wwYyi2DpyW8qTcPTcfNlw7dRSwIgGSbzOg9XYjCnosN6asmyl9JMVXbC07+PkWtl51kRFDcdRY46w== key_rsa_sha2_256_signed 2 | -------------------------------------------------------------------------------- /libssh2/tests/key_rsa_signed.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCwMtW6rz83hgCKqV1Xf2KPgtWA5pkVA3jY4CosgWsV8rjwSpq+AMmB1wzVdTT/zrEEyy2iLoIwiAXQ7wlpo1QQWklnChIdlbaxg+F0UullsYIYoExrL+9YMwRGwmd00yIe/POHlBCa10qeBWfdMmjt5ZDlakPVYwFjvK5lZ0UW1FM1ucqX5HoIPhVONfReZonCP+jwvin44IMaqtdaSy4k71Qq7RuRbMYeTzpNaxv2CbxubvY5E7wlDrT47e25Dn/XeoV2VEX9T87ZAMnwmeyDbKW2Dv48l4Zze3Y8veUojfH3NlA/F9+1PwdTlqKsf45E/VVLyTTtn1KJy2hLyuav8Qt6Wgew41G2F9alDJab11urcogRiHyI/oPo0c6Km1vieF7IfW72yE5TFTZtbzSNS+W0GCo1xh4TUx8bBNXHO4+mDFt2gNCgX+Hf64FlPqM0kaZSUtBVKrWSupgTbMSXfHbRV5NJvSdGpPUWeFD1ifxYcPhxwJlznTXVQumEglDueIMsnE8yKEYjREtuao8/r9+ORtqf9OPZsT9j+bwROevLFnKZkzfD9xYQyU2aMrRDuo8R6SD7SiI6tXRwlohdflXA6ng9RTNyqVROQDOJ94bGPD5b4Bbnm31s2GhhWjoByQGlkNW4BRDEJmgG9sE8ztAxl7d8CV2V93BOisaPkw== key_rsa_signed 2 | -------------------------------------------------------------------------------- /libssh2/tests/mansyntax.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) The libssh2 project and its contributors. 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | set -e 6 | set -u 7 | 8 | # Written by Mikhail Gusarov 9 | # 10 | # Run syntax checks for all manpages in the documentation tree. 11 | # 12 | # Requirement on macOS: brew install man-db 13 | # 14 | 15 | command -v gman >/dev/null 2>&1 && man() { gman "$@"; } 16 | 17 | dstdir="${builddir:-$PWD}" 18 | mandir="$(dirname "$0")/../docs" 19 | 20 | ec=0 21 | 22 | # 23 | # Only test if suitable man is available 24 | # 25 | if command -v grep >/dev/null 2>&1 && \ 26 | man --help 2>/dev/null | grep -q warnings; then 27 | 28 | trap 'rm -f "$dstdir/man3"' EXIT HUP INT TERM 29 | 30 | ln -sf "$mandir" "$dstdir/man3" 31 | 32 | for manpage in "$mandir"/libssh2_*.*; do 33 | echo "$manpage" 34 | warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$dstdir" --warnings \ 35 | -E UTF-8 -l "$manpage" >/dev/null 2>&1) 36 | if [ -n "$warnings" ]; then 37 | echo "$warnings" 38 | ec=1 39 | fi 40 | done 41 | else 42 | echo 'mansyntax: Required tool not found, skipping tests.' 43 | fi 44 | 45 | exit "$ec" 46 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ca_ecdsa: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAArAAAABNlY2RzYS 3 | 1zaGEyLW5pc3RwNTIxAAAACG5pc3RwNTIxAAAAhQQAfv15s+G2xg56J+audKAM4G9qOTFr 4 | bZRo0CTwvkb/oHrf9/2RSWqYsx/0m5mYCZVlecnZqwRHAOolXbc/Yb4cGjsALUj3UDirsn 5 | YR7Ve+SwnunkpvW/H3a98sA3sS+HCpd5RbpfWClSBOI9JEAlPtS1CrEQ7EmO7hmlFOH2cL 6 | 0qfHCyYAAAEA763VSe+t1UkAAAATZWNkc2Etc2hhMi1uaXN0cDUyMQAAAAhuaXN0cDUyMQ 7 | AAAIUEAH79ebPhtsYOeifmrnSgDOBvajkxa22UaNAk8L5G/6B63/f9kUlqmLMf9JuZmAmV 8 | ZXnJ2asERwDqJV23P2G+HBo7AC1I91A4q7J2Ee1XvksJ7p5Kb1vx92vfLAN7EvhwqXeUW6 9 | X1gpUgTiPSRAJT7UtQqxEOxJju4ZpRTh9nC9KnxwsmAAAAQgD8VJwi9RHYN13CAfhvdmjW 10 | xVjH55J5jDjPlENU2Z+cnm01SQ+9mPFEY4wDSvfiovD1VstNJX/P97WbHw+e5XL+HwAAAA 11 | JDQQ== 12 | -----END OPENSSH PRIVATE KEY----- 13 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ca_ecdsa.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB+/Xmz4bbGDnon5q50oAzgb2o5MWttlGjQJPC+Rv+get/3/ZFJapizH/SbmZgJlWV5ydmrBEcA6iVdtz9hvhwaOwAtSPdQOKuydhHtV75LCe6eSm9b8fdr3ywDexL4cKl3lFul9YKVIE4j0kQCU+1LUKsRDsSY7uGaUU4fZwvSp8cLJg== CA 2 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ca_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEiBsRlsihCg0nJGNqURhszCZw1FwZmDpkD64L6HFf2U/GFXFgDBtYJZ8zdgua+RA9F/QNhq14OUemJX39HggAox/Acwg1vKPm6WPYAb3DMyzXT4ws32SbFd5ld/sQrqJUeMxaFLu1f02eY0UttQe4+nMjoM4Me98Qho7TzgpDIgn9nls42Sjt6KM9muqTBIVv4USwi9IsFn+54e0CEjfgiFyU8/8bH6vp1rtMPA6m4vuidyt2pP7PHFnUnikQGsaG4ldO/D/G0FFtMqPXeC1wQXI5RHnRns9TiI6Ep3r3h64ZI5iBYZeG16Fk+nuGvtp+WLWE5m01vfEHc5o+p09j+Ni1mQ5pmUq3AOM/MZMh+eCkTstnCyng/bHEZTIKQi1nnu694Mcq8W1v34wgMyBN3bvE65NhjIdLubnHvDgzVn127wjPEdeVD9ShtACxNS4a6xJCWg6llHVyzezqnj68umXre02MsXLbFikV/fEvUOXUp/rDeo+LJizk2bHAlyk= ca_rsa 2 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ca_user_keys.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB+/Xmz4bbGDnon5q50oAzgb2o5MWttlGjQJPC+Rv+get/3/ZFJapizH/SbmZgJlWV5ydmrBEcA6iVdtz9hvhwaOwAtSPdQOKuydhHtV75LCe6eSm9b8fdr3ywDexL4cKl3lFul9YKVIE4j0kQCU+1LUKsRDsSY7uGaUU4fZwvSp8cLJg== CA 2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEiBsRlsihCg0nJGNqURhszCZw1FwZmDpkD64L6HFf2U/GFXFgDBtYJZ8zdgua+RA9F/QNhq14OUemJX39HggAox/Acwg1vKPm6WPYAb3DMyzXT4ws32SbFd5ld/sQrqJUeMxaFLu1f02eY0UttQe4+nMjoM4Me98Qho7TzgpDIgn9nls42Sjt6KM9muqTBIVv4USwi9IsFn+54e0CEjfgiFyU8/8bH6vp1rtMPA6m4vuidyt2pP7PHFnUnikQGsaG4ldO/D/G0FFtMqPXeC1wQXI5RHnRns9TiI6Ep3r3h64ZI5iBYZeG16Fk+nuGvtp+WLWE5m01vfEHc5o+p09j+Ni1mQ5pmUq3AOM/MZMh+eCkTstnCyng/bHEZTIKQi1nnu694Mcq8W1v34wgMyBN3bvE65NhjIdLubnHvDgzVn127wjPEdeVD9ShtACxNS4a6xJCWg6llHVyzezqnj68umXre02MsXLbFikV/fEvUOXUp/rDeo+LJizk2bHAlyk= ca_rsa 3 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ssh_host_ecdsa_key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIKdqGrp+52U1ehslMI4fX0cmvgHFmKSkMzQGmj6B07ecoAoGCCqGSM49 3 | AwEHoUQDQgAEL7+zLJ4okP10LZkf1DuIkZF5HhgzetQIyxLKeTJeiN19IKUYIxjs 4 | m9aW3fQRKNi/GhN9JEbHpa9qpgr+8+hhDg== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/ssh_host_ed25519_key: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW 3 | QyNTUxOQAAACCMbXcoNmUVxO9FMMj1VB91MnwwVfBl+XDxet+j+oY6JgAAAJg8nvUxPJ71 4 | MQAAAAtzc2gtZWQyNTUxOQAAACCMbXcoNmUVxO9FMMj1VB91MnwwVfBl+XDxet+j+oY6Jg 5 | AAAECnhCuTDYdz3kUn48BXkaCXXdbKdH7wSIQ/CUx1cbnR0Ixtdyg2ZRXE70UwyPVUH3Uy 6 | fDBV8GX5cPF636P6hjomAAAAEHdpbGxAaUN1YmUubG9jYWwBAgMEBQ== 7 | -----END OPENSSH PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /libssh2/tests/openssh_server/sshd_config: -------------------------------------------------------------------------------- 1 | HostKeyAlgorithms +ssh-rsa 2 | PubkeyAcceptedKeyTypes +ssh-rsa,ssh-rsa-cert-v01@openssh.com 3 | MACs +hmac-sha1,hmac-sha1-96,hmac-sha2-256,hmac-sha2-512,hmac-md5,hmac-md5-96,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-md5-96-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com 4 | Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com 5 | -------------------------------------------------------------------------------- /libssh2/tests/ossfuzz/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir)/include 2 | LDADD = $(top_builddir)/src/libssh2.la 3 | 4 | if USE_OSSFUZZ_FLAG 5 | FUZZ_FLAG = $(LIB_FUZZING_ENGINE) 6 | else 7 | if USE_OSSFUZZ_STATIC 8 | LDADD += $(LIB_FUZZING_ENGINE) 9 | FUZZ_FLAG = 10 | else 11 | LDADD += libstandaloneengine.a 12 | FUZZ_FLAG = 13 | endif 14 | endif 15 | 16 | noinst_PROGRAMS = 17 | noinst_LIBRARIES = 18 | 19 | if USE_OSSFUZZERS 20 | noinst_PROGRAMS += \ 21 | ssh2_client_fuzzer 22 | 23 | noinst_LIBRARIES += \ 24 | libstandaloneengine.a 25 | endif 26 | 27 | ssh2_client_fuzzer_SOURCES = ssh2_client_fuzzer.cc testinput.h 28 | ssh2_client_fuzzer_CXXFLAGS = $(AM_CXXFLAGS) $(FUZZ_FLAG) 29 | ssh2_client_fuzzer_LDFLAGS = $(AM_LDFLAGS) -static 30 | 31 | libstandaloneengine_a_SOURCES = standaloneengine.cc 32 | libstandaloneengine_a_CXXFLAGS = $(AM_CXXFLAGS) 33 | 34 | EXTRA_DIST = ossfuzz.sh 35 | -------------------------------------------------------------------------------- /libssh2/tests/ossfuzz/ossfuzz.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | # This script is called by the oss-fuzz main project when compiling the fuzz 6 | # targets. This script is regression tested by ci/ossfuzz.sh. 7 | 8 | # Save off the current folder as the build root. 9 | export BUILD_ROOT="$PWD" 10 | 11 | echo "CC: $CC" 12 | echo "CXX: $CXX" 13 | echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE" 14 | echo "CFLAGS: $CFLAGS" 15 | echo "CXXFLAGS: $CXXFLAGS" 16 | echo "OUT: $OUT" 17 | 18 | MAKEFLAGS+="-j$(nproc)" 19 | export MAKEFLAGS 20 | 21 | # Install dependencies 22 | apt-get -y install automake libtool libssl-dev zlib1g-dev 23 | 24 | # Compile the fuzzer. 25 | autoreconf -fi 26 | ./configure --disable-shared \ 27 | --enable-ossfuzzers \ 28 | --disable-examples-build \ 29 | --enable-debug 30 | make V=1 31 | 32 | # Copy the fuzzer to the output directory. 33 | cp -v tests/ossfuzz/ssh2_client_fuzzer "$OUT/" 34 | -------------------------------------------------------------------------------- /libssh2/tests/ossfuzz/testinput.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | #include 6 | 7 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); 8 | -------------------------------------------------------------------------------- /libssh2/tests/test_aa_warmup.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) Viktor Szakats 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | /* Warm-up test. Always return success. 7 | Workaround for CI/docker/etc flakiness on the first run. */ 8 | 9 | #include "runner.h" 10 | 11 | int test(LIBSSH2_SESSION *session) 12 | { 13 | size_t len = 0; 14 | int type = 0; 15 | const char *hostkey = libssh2_session_hostkey(session, &len, &type); 16 | 17 | (void)hostkey; 18 | 19 | fprintf(stdout, 20 | "libssh2_session_hostkey returned len, type: %ld, %d\n", 21 | (long)len, type); 22 | 23 | return 0; /* always return success */ 24 | } 25 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_keyboard_fail.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_keyboard(session, TEST_AUTH_SHOULDFAIL, 11 | "libssh2", /* set in Dockerfile */ 12 | "I am the wrong password"); 13 | } 14 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_keyboard_ok.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_keyboard(session, 0, 11 | "libssh2", /* set in Dockerfile */ 12 | "my test password"); /* set in Dockerfile */ 13 | } 14 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_password_fail_password.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_password(session, TEST_AUTH_SHOULDFAIL, 11 | "libssh2", /* set in Dockerfile */ 12 | "I am the wrong password"); 13 | } 14 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_password_fail_username.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_password(session, TEST_AUTH_SHOULDFAIL, 11 | "I am the wrong username", 12 | "my test password"); /* set in Dockerfile */ 13 | } 14 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_password_ok.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_password(session, 0, 11 | "libssh2", /* set in Dockerfile */ 12 | "my test password"); /* set in Dockerfile */ 13 | } 14 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_fail.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | return test_auth_pubkey(session, TEST_AUTH_SHOULDFAIL, 11 | "libssh2", /* set in Dockerfile */ 12 | NULL, 13 | "key_dsa_wrong.pub", /* Not authorized on server */ 14 | "key_dsa_wrong"); 15 | } 16 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_dsa.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_DSA 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | NULL, 15 | "key_dsa.pub", 16 | "key_dsa"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_ecdsa.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_ECDSA 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | NULL, 15 | "key_ecdsa.pub", 16 | "key_ecdsa"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_ecdsa_signed.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_ECDSA && \ 11 | (defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)) 12 | /* set in Dockerfile */ 13 | return test_auth_pubkey(session, 0, 14 | "libssh2", 15 | NULL, 16 | "key_ecdsa_signed-cert.pub", 17 | "key_ecdsa_signed"); 18 | #else 19 | (void)session; 20 | return 0; 21 | #endif 22 | } 23 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_ed25519.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_ED25519 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | NULL, 15 | "key_ed25519.pub", 16 | "key_ed25519"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_ed25519_encrypted.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_ED25519 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | "libssh2", 15 | "key_ed25519_encrypted.pub", 16 | "key_ed25519_encrypted"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_ed25519_mem.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_ED25519 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, TEST_AUTH_FROMMEM, 13 | "libssh2", 14 | NULL, 15 | NULL, 16 | "key_ed25519"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA1 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | NULL, 15 | "key_rsa.pub", 16 | "key_rsa"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa_aes256gcm.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA1 && LIBSSH2_AES_GCM && \ 11 | (defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)) 12 | /* set in Dockerfile */ 13 | return test_auth_pubkey(session, 0, 14 | "libssh2", 15 | "libssh2", 16 | "key_rsa_aes256gcm.pub", 17 | "key_rsa_aes256gcm"); 18 | #else 19 | (void)session; 20 | return 0; 21 | #endif 22 | } 23 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa_encrypted.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA1 && LIBSSH2_MD5_PEM 11 | /* set in Dockerfile */ 12 | return test_auth_pubkey(session, 0, 13 | "libssh2", 14 | "libssh2", 15 | "key_rsa_encrypted.pub", 16 | "key_rsa_encrypted"); 17 | #else 18 | (void)session; 19 | return 0; 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa_openssh.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA1 && \ 11 | (defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)) 12 | /* set in Dockerfile */ 13 | return test_auth_pubkey(session, 0, 14 | "libssh2", 15 | NULL, 16 | "key_rsa_openssh.pub", 17 | "key_rsa_openssh"); 18 | #else 19 | (void)session; 20 | return 0; 21 | #endif 22 | } 23 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa_sha2_256_signed.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA2 && \ 11 | (defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)) 12 | /* set in Dockerfile */ 13 | return test_auth_pubkey(session, 0, 14 | "libssh2", 15 | NULL, 16 | "key_rsa_sha2_256_signed-cert.pub", 17 | "key_rsa_sha2_256_signed"); 18 | #else 19 | (void)session; 20 | return 0; 21 | #endif 22 | } 23 | -------------------------------------------------------------------------------- /libssh2/tests/test_auth_pubkey_ok_rsa_signed.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) The libssh2 project and its contributors. 2 | * 3 | * SPDX-License-Identifier: BSD-3-Clause 4 | */ 5 | 6 | #include "runner.h" 7 | 8 | int test(LIBSSH2_SESSION *session) 9 | { 10 | #if LIBSSH2_RSA_SHA1 && \ 11 | (defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)) 12 | /* set in Dockerfile */ 13 | return test_auth_pubkey(session, 0, 14 | "libssh2", 15 | NULL, 16 | "key_rsa_signed-cert.pub", 17 | "key_rsa_signed"); 18 | #else 19 | (void)session; 20 | return 0; 21 | #endif 22 | } 23 | -------------------------------------------------------------------------------- /libssh2/tests/test_read_algos.test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (C) Viktor Szakats 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | set -e 6 | set -u 7 | 8 | # https://testanything.org/tap-specification.html 9 | 10 | testbin="./test_read${EXEEXT:-}" 11 | 12 | d="$(dirname "$0")" 13 | algos="$(tr -d $"\r" < "${d}/test_read_algos.txt")" 14 | 15 | count=1 16 | total="$(echo "${algos}" | wc -l | tr -d ' ')" 17 | 18 | echo "${count}..${total}" 19 | 20 | while read -r test; do 21 | if [[ "${test}" = *'mac-'* ]]; then 22 | if FIXTURE_TEST_MAC="${test}" "${testbin}"; then 23 | res='ok' 24 | else 25 | res='not ok' 26 | fi 27 | else 28 | if FIXTURE_TEST_CRYPT="${test}" "${testbin}"; then 29 | res='ok' 30 | else 31 | res='not ok' 32 | fi 33 | fi 34 | echo "${res} ${count} - test_read-${test}" 35 | ((count++)) 36 | done <<< "${algos}" 37 | -------------------------------------------------------------------------------- /libssh2/tests/test_read_algos.txt: -------------------------------------------------------------------------------- 1 | 3des-cbc 2 | aes128-cbc 3 | aes128-ctr 4 | aes128-gcm@openssh.com 5 | aes192-cbc 6 | aes192-ctr 7 | aes256-cbc 8 | aes256-ctr 9 | aes256-gcm@openssh.com 10 | hmac-md5 11 | hmac-md5-96 12 | hmac-sha1 13 | hmac-sha1-96 14 | hmac-sha1-etm@openssh.com 15 | hmac-sha2-256 16 | hmac-sha2-256-etm@openssh.com 17 | hmac-sha2-512 18 | hmac-sha2-512-etm@openssh.com 19 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | cython 2 | flake8 3 | jinja2 4 | pytest 5 | pytest-rerunfailures 6 | -r doc/requirements.txt 7 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [versioneer] 2 | VCS = git 3 | style = pep440 4 | versionfile_source = ssh2/_version.py 5 | tag_prefix = '' 6 | 7 | [bdist_wheel] 8 | universal = 0 9 | 10 | [flake8] 11 | max-line-length = 100 12 | filename = *.pyx,*.px* 13 | exclude = .eggs,*.egg,build 14 | ignore = E901,E225,E226,E227,E999 15 | 16 | [tool:pytest] 17 | addopts=-v --durations=10 --reruns=5 18 | testpaths = 19 | tests 20 | -------------------------------------------------------------------------------- /ssh2/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/ssh2/__init__.pxd -------------------------------------------------------------------------------- /ssh2/__init__.py: -------------------------------------------------------------------------------- 1 | from . import _version 2 | __version__ = _version.get_versions()['version'] 3 | del _version 4 | -------------------------------------------------------------------------------- /ssh2/channel.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .session cimport Session 18 | from . cimport c_ssh2 19 | 20 | 21 | cdef object PyChannel(c_ssh2.LIBSSH2_CHANNEL *channel, Session session) 22 | 23 | 24 | cdef class Channel: 25 | cdef c_ssh2.LIBSSH2_CHANNEL *_channel 26 | cdef Session _session 27 | -------------------------------------------------------------------------------- /ssh2/ext/find_eol.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of ssh2-python. 3 | Copyright (C) 2017-2020 Panos Kittenis 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation, version 2.1. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | int find_eol(char* data, int* new_pos); 20 | -------------------------------------------------------------------------------- /ssh2/fileinfo.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from . cimport c_ssh2 18 | 19 | cdef class FileInfo: 20 | """Representation of stat structure""" 21 | cdef c_ssh2.libssh2_struct_stat* _stat 22 | -------------------------------------------------------------------------------- /ssh2/knownhost.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .session cimport Session 18 | from . cimport c_ssh2 19 | 20 | 21 | cdef KnownHost PyKnownHost(Session session, c_ssh2.LIBSSH2_KNOWNHOSTS *_ptr) 22 | 23 | 24 | cdef class KnownHostEntry: 25 | cdef c_ssh2.libssh2_knownhost *_store 26 | 27 | 28 | cdef class KnownHost: 29 | cdef c_ssh2.LIBSSH2_KNOWNHOSTS *_ptr 30 | cdef Session _session 31 | -------------------------------------------------------------------------------- /ssh2/listener.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .session cimport Session 18 | 19 | from . cimport c_ssh2 20 | 21 | cdef object PyListener(c_ssh2.LIBSSH2_LISTENER *listener, Session session) 22 | 23 | 24 | cdef class Listener: 25 | cdef c_ssh2.LIBSSH2_LISTENER *_listener 26 | cdef Session _session 27 | -------------------------------------------------------------------------------- /ssh2/pkey.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from . cimport c_ssh2 18 | 19 | 20 | cdef object PyPublicKey(c_ssh2.libssh2_agent_publickey *pkey) 21 | 22 | 23 | cdef class PublicKey: 24 | cdef c_ssh2.libssh2_agent_publickey *_pkey 25 | -------------------------------------------------------------------------------- /ssh2/publickey.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .session cimport Session 18 | from . cimport c_pkey 19 | 20 | 21 | cdef object PyPublicKeyList(c_pkey.libssh2_publickey_list *_list) 22 | cdef object PyPublicKeySystem(c_pkey.LIBSSH2_PUBLICKEY *_pkey_s, 23 | Session session) 24 | -------------------------------------------------------------------------------- /ssh2/session.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from . cimport c_ssh2 18 | 19 | cdef class Session: 20 | cdef c_ssh2.LIBSSH2_SESSION *_session 21 | cdef int _sock 22 | cdef readonly object sock 23 | cdef readonly object _kbd_callback 24 | 25 | 26 | cdef class MethodType: 27 | cdef int value 28 | -------------------------------------------------------------------------------- /ssh2/sftp.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .session cimport Session 18 | 19 | from . cimport c_ssh2 20 | from . cimport c_sftp 21 | 22 | 23 | cdef object PySFTP(c_sftp.LIBSSH2_SFTP *sftp, Session session) 24 | 25 | 26 | cdef class SFTP: 27 | cdef c_sftp.LIBSSH2_SFTP *_sftp 28 | cdef Session _session 29 | -------------------------------------------------------------------------------- /ssh2/statinfo.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | from .c_stat cimport struct_stat 18 | 19 | 20 | cdef class StatInfo: 21 | """Representation of stat structure - older version""" 22 | cdef struct_stat* _stat 23 | -------------------------------------------------------------------------------- /ssh2/utils.pxd: -------------------------------------------------------------------------------- 1 | # This file is part of ssh2-python. 2 | # Copyright (C) 2017-2020 Panos Kittenis 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation, version 2.1. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | cdef extern from "ext/find_eol.h" nogil: 18 | int c_find_eol "find_eol" (char* data, int* new_pos) 19 | cdef bytes to_bytes(_str) 20 | cdef object to_str(char *c_str) 21 | cdef object to_str_len(char *c_str, int length) 22 | cpdef int handle_error_codes(int errcode) except -1 23 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/tests/__init__.py -------------------------------------------------------------------------------- /tests/base_test.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | 4 | class SSH2TestCase(unittest.TestCase): 5 | 6 | def setUp(self): 7 | self.port = 2222 8 | -------------------------------------------------------------------------------- /tests/test_agent.py: -------------------------------------------------------------------------------- 1 | from ssh2.agent import Agent 2 | from ssh2.session import Session 3 | 4 | from .base_test import SSH2TestCase 5 | 6 | 7 | class SessionTestCase(SSH2TestCase): 8 | 9 | def test_agent(self): 10 | session = Session() 11 | agent = Agent(session) 12 | self.assertIsInstance(agent, Agent) 13 | -------------------------------------------------------------------------------- /tests/test_channel.py: -------------------------------------------------------------------------------- 1 | from ssh2.channel import Channel 2 | from ssh2.session import Session 3 | 4 | from .base_test import SSH2TestCase 5 | 6 | 7 | class ChannelTestCase(SSH2TestCase): 8 | 9 | def test_init(self): 10 | session = Session() 11 | chan = Channel(session) 12 | self.assertIsInstance(chan, Channel) 13 | self.assertEqual(chan.session, session) 14 | -------------------------------------------------------------------------------- /tests/test_session.py: -------------------------------------------------------------------------------- 1 | from ssh2.session import Session, LIBSSH2_METHOD_HOSTKEY 2 | 3 | from .base_test import SSH2TestCase 4 | 5 | 6 | class SessionTestCase(SSH2TestCase): 7 | def test_session(self): 8 | session = Session() 9 | self.assertIsInstance(session, Session) 10 | 11 | def test_methods(self): 12 | session = Session() 13 | methods = session.methods(LIBSSH2_METHOD_HOSTKEY) 14 | self.assertIsNone(methods) 15 | -------------------------------------------------------------------------------- /tests/test_sftp.py: -------------------------------------------------------------------------------- 1 | from ssh2.session import Session 2 | from ssh2.sftp import SFTP 3 | from ssh2.sftp_handle import SFTPAttributes 4 | 5 | from .base_test import SSH2TestCase 6 | 7 | 8 | class SFTPTestCase(SSH2TestCase): 9 | 10 | def test_init(self): 11 | session = Session() 12 | sftp = SFTP(session) 13 | self.assertIsInstance(sftp, SFTP) 14 | self.assertIsInstance(sftp.session, Session) 15 | self.assertEqual(sftp.session, session) 16 | 17 | def test_sftp_attrs_cls(self): 18 | attrs = SFTPAttributes() 19 | self.assertIsInstance(attrs, SFTPAttributes) 20 | 21 | def test_session(self): 22 | session = Session() 23 | self.assertIsInstance(session, Session) 24 | -------------------------------------------------------------------------------- /zlib-1.2.11/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/ada/zlib.gpr: -------------------------------------------------------------------------------- 1 | project Zlib is 2 | 3 | for Languages use ("Ada"); 4 | for Source_Dirs use ("."); 5 | for Object_Dir use "."; 6 | for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); 7 | 8 | package Compiler is 9 | for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); 10 | end Compiler; 11 | 12 | package Linker is 13 | for Default_Switches ("ada") use ("-lz"); 14 | end Linker; 15 | 16 | package Builder is 17 | for Default_Switches ("ada") use ("-s", "-gnatQ"); 18 | end Builder; 19 | 20 | end Zlib; 21 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/blast/test.pk -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET 13 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET 14 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET 15 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/iostream/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "zfstream.h" 3 | 4 | int main() { 5 | 6 | // Construct a stream object with this filebuffer. Anything sent 7 | // to this stream will go to standard out. 8 | gzofstream os( 1, ios::out ); 9 | 10 | // This text is getting compressed and sent to stdout. 11 | // To prove this, run 'test | zcat'. 12 | os << "Hello, Mommy" << endl; 13 | 14 | os << setcompressionlevel( Z_NO_COMPRESSION ); 15 | os << "hello, hello, hi, ho!" << endl; 16 | 17 | setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) 18 | << "I'm compressing again" << endl; 19 | 20 | os.close(); 21 | 22 | return 0; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/iostream2/zstream_test.cpp: -------------------------------------------------------------------------------- 1 | #include "zstream.h" 2 | #include 3 | #include 4 | #include 5 | 6 | void main() { 7 | char h[256] = "Hello"; 8 | char* g = "Goodbye"; 9 | ozstream out("temp.gz"); 10 | out < "This works well" < h < g; 11 | out.close(); 12 | 13 | izstream in("temp.gz"); // read it back 14 | char *x = read_string(in), *y = new char[256], z[256]; 15 | in > y > z; 16 | in.close(); 17 | cout << x << endl << y << endl << z << endl; 18 | 19 | out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results 20 | out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; 21 | out << z << endl << y << endl << x << endl; 22 | out << 1.1234567890123456789 << endl; 23 | 24 | delete[] x; delete[] y; 25 | } 26 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/iostream3/TODO: -------------------------------------------------------------------------------- 1 | Possible upgrades to gzfilebuf: 2 | 3 | - The ability to do putback (e.g. putbackfail) 4 | 5 | - The ability to seek (zlib supports this, but could be slow/tricky) 6 | 7 | - Simultaneous read/write access (does it make sense?) 8 | 9 | - Support for ios_base::ate open mode 10 | 11 | - Locale support? 12 | 13 | - Check public interface to see which calls give problems 14 | (due to dependence on library internals) 15 | 16 | - Override operator<<(ostream&, gzfilebuf*) to allow direct copying 17 | of stream buffer to stream ( i.e. os << is.rdbuf(); ) 18 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/masmx64/bld_ml64.bat: -------------------------------------------------------------------------------- 1 | ml64.exe /Flinffasx64 /c /Zi inffasx64.asm 2 | ml64.exe /Flgvmat64 /c /Zi gvmat64.asm 3 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/masmx86/bld_ml32.bat: -------------------------------------------------------------------------------- 1 | ml /coff /Zi /c /Flmatch686.lst match686.asm 2 | ml /coff /Zi /c /Flinffas32.lst inffas32.asm 3 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/masmx86/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | Summary 3 | ------- 4 | This directory contains ASM implementations of the functions 5 | longest_match() and inflate_fast(). 6 | 7 | 8 | Use instructions 9 | ---------------- 10 | Assemble using MASM, and copy the object files into the zlib source 11 | directory, then run the appropriate makefile, as suggested below. You can 12 | donwload MASM from here: 13 | 14 | http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 15 | 16 | You can also get objects files here: 17 | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 19 | 20 | Build instructions 21 | ------------------ 22 | * With Microsoft C and MASM: 23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" 24 | 25 | * With Borland C and TASM: 26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" 27 | 28 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | ./minizip test readme.txt 20 | ./miniunz -l test.zip 21 | mv readme.txt readme.old 22 | ./miniunz test.zip 23 | 24 | clean: 25 | /bin/rm -f *.o *~ minizip miniunz 26 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libminizip.la 2 | 3 | if COND_DEMOS 4 | bin_PROGRAMS = miniunzip minizip 5 | endif 6 | 7 | zlib_top_srcdir = $(top_srcdir)/../.. 8 | zlib_top_builddir = $(top_builddir)/../.. 9 | 10 | AM_CPPFLAGS = -I$(zlib_top_srcdir) 11 | AM_LDFLAGS = -L$(zlib_top_builddir) 12 | 13 | if WIN32 14 | iowin32_src = iowin32.c 15 | iowin32_h = iowin32.h 16 | endif 17 | 18 | libminizip_la_SOURCES = \ 19 | ioapi.c \ 20 | mztools.c \ 21 | unzip.c \ 22 | zip.c \ 23 | ${iowin32_src} 24 | 25 | libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 26 | 27 | minizip_includedir = $(includedir)/minizip 28 | minizip_include_HEADERS = \ 29 | crypt.h \ 30 | ioapi.h \ 31 | mztools.h \ 32 | unzip.h \ 33 | zip.h \ 34 | ${iowin32_h} 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = minizip.pc 38 | 39 | EXTRA_PROGRAMS = miniunzip minizip 40 | 41 | miniunzip_SOURCES = miniunz.c 42 | miniunzip_LDADD = libminizip.la 43 | 44 | minizip_SOURCES = minizip.c 45 | minizip_LDADD = libminizip.la -lz 46 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com]) 5 | AC_CONFIG_SRCDIR([minizip.c]) 6 | AM_INIT_AUTOMAKE([foreign]) 7 | LT_INIT 8 | 9 | AC_MSG_CHECKING([whether to build example programs]) 10 | AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) 11 | AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) 12 | if test "$enable_demos" = yes 13 | then 14 | AC_MSG_RESULT([yes]) 15 | else 16 | AC_MSG_RESULT([no]) 17 | fi 18 | 19 | case "${host}" in 20 | *-mingw* | mingw*) 21 | WIN32="yes" 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) 27 | 28 | 29 | AC_SUBST([HAVE_UNISTD_H], [0]) 30 | AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) 31 | AC_CONFIG_FILES([Makefile minizip.pc]) 32 | AC_OUTPUT 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 22 | void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); 23 | void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); 24 | void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/make_vms.com: -------------------------------------------------------------------------------- 1 | $ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig 2 | $ open/write zdef vmsdefs.h 3 | $ copy sys$input: zdef 4 | $ deck 5 | #define unix 6 | #define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from 7 | #define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator 8 | #define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord 9 | #define Write_EndOfCentralDirectoryRecord Write_EoDRecord 10 | $ eod 11 | $ close zdef 12 | $ copy vmsdefs.h,ioapi.h_orig ioapi.h 13 | $ cc/include=[--]/prefix=all ioapi.c 14 | $ cc/include=[--]/prefix=all miniunz.c 15 | $ cc/include=[--]/prefix=all unzip.c 16 | $ cc/include=[--]/prefix=all minizip.c 17 | $ cc/include=[--]/prefix=all zip.c 18 | $ link miniunz,unzip,ioapi,[--]libz.olb/lib 19 | $ link minizip,zip,ioapi,[--]libz.olb/lib 20 | $ mcr []minizip test minizip_info.txt 21 | $ mcr []miniunz -l test.zip 22 | $ rename minizip_info.txt; minizip_info.txt_old 23 | $ mcr []miniunz test.zip 24 | $ delete test.zip;* 25 | $exit 26 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc10/miniunz.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {048af943-022b-4db6-beeb-a54c34774ee2} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {0844199a-966b-4f19-81db-1e0125e141b9} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc10/minizip.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c0419b40-bf50-40da-b153-ff74215b79de} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {bb87b070-735b-478e-92ce-7383abb2f36c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {f46ab6a6-548f-43cb-ae96-681abb5bd5db} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc10/testzlibdll.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fa61a89f-93fc-4c89-b29e-36224b7592f4} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {d4b85da0-2ba2-4934-b57f-e2584e3848ee} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc10/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc11/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc12/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc14/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/contrib/vstudio/vc9/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 2, 11, 0 6 | PRODUCTVERSION 1, 2, 11, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.2.11\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /zlib-1.2.11/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /zlib-1.2.11/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /zlib-1.2.11/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /zlib-1.2.11/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /zlib-1.2.11/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /zlib-1.2.11/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /zlib-1.2.11/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParallelSSH/ssh2-python/3b880a0aa5852fe9f6f0dac82bf84bb5612540b9/zlib-1.2.11/zlib.3.pdf -------------------------------------------------------------------------------- /zlib-1.2.11/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /zlib-1.2.11/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | --------------------------------------------------------------------------------