Questions tagged [libssh]

libssh is a mulitplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side.

libssh is a C library that enables you to write a program that uses the SSH protocol. With it, you can remotely execute programs, transfer files, or use a secure and transparent tunnel for your remote programs. The SSH protocol is encrypted, ensures data integrity, and provides strong means of authenticating both the server and the client. The library hides a lot of technical details from the SSH protocol, but this does not mean that you should not try to know about and understand these details.

libssh is a Free Software / Open Source project. The libssh library is distributed under LGPL license. The libssh project has nothing to do with "libssh2", which is a completely different and independent project.

libssh can run on top of either libgcrypt or libcrypto, two general-purpose cryptographic libraries.

218 questions
0
votes
1 answer

Finding appropriate keys to use for authenticating an SSH connection with Objective-C

Several native Mac applications I've used that open SSH connections seem to have this magical ability to find the appropriate public+private keys to use for connecting (if present) and then present the system keychain dialog to ask the user to enter…
John Wells
  • 1,139
  • 1
  • 10
  • 27
0
votes
1 answer

How to do double authentication using libssh module?

My SSH server uses double authtication. I do not know how its implemented. But initially its asks for a password, then again asks for another password to login to a separate console which is different from usual control. My code is similar to the…
Bala
  • 381
  • 3
  • 16
0
votes
0 answers

CMAKE getaddrinfo error during make of libssh

I am using CMAKE with minGW to compile libssh. But every time I get getaddrInfo error. I guess it's not able to link with ws2_32.lib. Can anybody help me out?
Raghaw Shukla
  • 11
  • 1
  • 5
0
votes
1 answer

How can I download entire directory from remote machine with using scp libssh library in c++?

I am trying to download specific directory in my remote machine. I downloaded a file from remote machine with this code. But I need to download entire directories. I tried this code. But I was not able to copy an entire directory. // Indicate the…
EmreS
  • 159
  • 1
  • 3
  • 15
0
votes
0 answers

create a tunnel for file transfer using SCP

I want to perform scp with tunnel in between to some remote PC. I am using LIBSSH which has scp functionality but I am not able to figure out how to add a tunnel for scp. Can anybody help me out?
Raghaw Shukla
  • 11
  • 1
  • 5
0
votes
1 answer

no authentication methods available using libssh

Even though I can authenticate with various methods on my servers, using the libssh library, no authentication methods are detected. Here's a sample of code: #include #include int main(int,char**) { ssh_session…
user3387633
  • 121
  • 11
0
votes
1 answer

libssh bind_accept error : Could not create BIO

I'm in a team building a software that incorporates SSH, with a client-server architecture. I'm writing the SSH server, testing on local machine before the deployment on the remote server computer, using the libssh C API. The server builds and links…
Kimutai
  • 1,022
  • 11
  • 15
0
votes
1 answer

sftp_read jumps large blocks of bytes when reading from a file

I'm trying to download a file over sftp and so far I've connected to a server via ssh session then opened an sftp session using the ssh session and everything seems fine. I have opened a file on the server and I'm using sftp_read() to get block of…
Stapps
  • 13
  • 4
0
votes
2 answers

libssh trying to authenticate with public and private keys

I've been trying to use libssh to connect to a server and download files via SFTP. I have a PuTTY private key file containing 6 lines of key for the public key and 12 for the private key yet I can't find any decent help or documentation of taking…
Stapps
  • 13
  • 4
0
votes
1 answer

Undefined symbol during link using libssh

I am using libssh to accomplish connectivity between two systems, the ssh server is redhat, and the client is CentOS. My code compiles and links just fine, except, at runtime I keep seeing this, [1] libssh 0.5.5 (c) 2003-2010 Aris Adamantiadis…
RNS
  • 151
  • 1
  • 7
0
votes
1 answer

libssh session connection timed out error

I've downloaded and compiled libssh 0.6.1 from libSSH . I also linked the ssh.lib,ssh.dll to a visual c++ project . The library with code below compiles and run fine , but when calling ssh_connect() , it return -1 : Timeout . I used the option : …
saeed hardan
  • 485
  • 2
  • 11
  • 24
0
votes
3 answers

Parse "passwd" command with phpseclib

I tried to parse "passwd" command to my machine with phpseclib but it can't go through the first password typing. Look at the code below. $ssh->write(" passwd $new_user\n $new_user_pw\n $new_user_pw\n "); $ssh->setTimeout(5); echo…
harisdev
  • 4,146
  • 5
  • 19
  • 25
0
votes
1 answer

ssh_channel_open_forward none blocking

I am trying to implement ssh client with libssh. According libssh doc: http://api.libssh.org/stable/group__libssh__channel.html#gae86b0704a1f2bdebb268b55567f7f47b ssh_channel_open_forward is supporting none block mode. Here is my sequence: 1.…
Daniel Chen
  • 103
  • 7
0
votes
0 answers

Linking a library

I am currently trying to create a c program that shall ssh into a couple of remote servers. I am attempting to link the libssh library to my program but I am having difficulty. This is my main source file: #include #include…
0
votes
1 answer

Compiling a c program on a 64 bit machine with a 32 bit binary

I am currently trying to use the libssh.dll library to implement a c program that shall connect to remote computers.I am using gcc to compile the program. When compiling this program, I received this error: i386 architecture of input file…