libssh 0.3
05.21.09 - 02:05pm
It’s done! After several month of hard work we have a new release of libssh.
Version 0.3 has a lot of small and major changes. The API has been improved and
by this we had to break the API and ABI compability.
New functions:
channel_read_buffer, channel_get_exit_status, ssh_auth_list,
ssh_userauth_agent_pubkey, ssh_get_hexa, ssh_version
Changed functions:
channel_read, ssh_get_pubkey_hash, privatekey_free, try_publickey_from_file,
ssh_options_*
Please let us know if there is documentation unclear or missing. Please join
our mailing list or visit our irc channel. You can download libssh 0.3 here along with a NSIS installer for Windows. Packages for openSUSE and Fedora are available here.
ChangeLog:
- Added support for ssh-agent authentication.
- Added POSIX like sftp implementation.
- Added error checking to all functions.
- Added const to arguments where it was needed.
- Added a channel_get_exit_status() function.
- Added a channel_read_buffer() function, channel_read() is now a POSIX like function.
- Added a more generic auth callback function.
- Added printf attribute checking for log and error functions.
- Added runtime function tracer support.
- Added NSIS build support with CPack.
- Added openssh hashed host support.
- Added API documentation for all public functions.
- Added asynchronous SFTP read function.
- Added a ssh_bind_set_fd() function.
- Fixed known_hosts parsing.
- Fixed a lot of build warnings.
- Fixed the Windows build.
- Fixed a lot of memory leaks.
- Fixed a double free corruption in the server support.
- Fixed the “ssh_accept:” bug in server support.
- Fixed important channel bugs.
- Refactored the socket handling.
- Switched to CMake build system.
- Improved performance.
Great job! Is there any documentation about how to upgrade? E.g. when/why would I use the new channel_read_buffer()? Anything that is considered deprecated?
The channel_read_buffer() is the old channel_read() function. channel_read() is now a POSIX like function. I would suggest to use the POSIX like function.
This last thursday (21st / may) libssh-0.3 was released in its brand new website! – http://www.otubo.net/2009/05/libshs-03-released.html
Hi guys, this is really a cool project, thanks!
I would like to contribute, but I don’t see a link to the source in any place of this site, or even on the ohloh
Can you share the repository with us?
Again, many thanks by this!
Carlos.
Ups, I’ve added it to http://www.libssh.org/get-it/
Quick question guys – I submitted an inquiry on other site about C++ wrappers and multithreading. I have just now got around to addressing this issue again. So I have a couple of questions.
In the previous reply on the other site, it was pointed out to me that each sftp session needs to have it’s own connection, which makes sense, since each socket can only have one destination address when used in this manner.
I did not find anything wrong with the individual code in previous implementation, and since there has been a library upgrade, I will start from scratch. What I am looking to accomplish is to multithread a group of sftp processes to different servers executed in a particular time frame, they will be all kicked off at once.
They will be picking up files from each of these destinations. They will also deposit said files in individual directories. that will be date specific.
In previous correspondence I was asked to post code, which I will if this cannot be accomplished with this upgrade.
The main issue here is the need/or desire to multithread this process, bandwidth is not an issue for this, I have virtually unlimited bandwidth.
Also, the other requirements that require me to implement this in this manner is the requirements that I cannot use ‘authorized_keys’ so login has to take place on the fly.
I can essentially implement this in an old ‘fork and exec’ fashion, and not be concerned with threading. I would prefer to implement this with threading.
Preliminary observations (I have not looked at the new code, yet), but the ‘ssh_connect’ function really appears to be a potential problem, since it (preliminarily) implies sequential execution.
I have tried a couple of libraries other than this, NetSiebens (c++, but very basic), libssh2, and this one, I am back to this one because it says it can multithread, I am not sure of this yet, because gcrypt requires special setup (again, have not reviewed current code base), to service multiple threads.
So, if this is doable, or not please say so, I am on the virge of writing from scratch what I need. I would not be adverse to sharing what if anything can be done to multithread using sftp.
We don’t lie
libssh is thread safe if you use different sessions at the same time. If not then there is a bug which needs to be fixed.
If you have questions I suggest to subscribe to the mailing list. The comment function is not an appropriate place. On the mailing list are more people and it is likely that someone already did what you want to do.
Direction taken, no intent to question anyone’s integrity, I apologize if it was taken wrong.
Great job! Is there any documentation about how to upgrade? E.g. when/why would I use the new channel_read_buffer()? Anything that is considered deprecated?
The channel_read_buffer() is the old channel_read() function. channel_read() is now a POSIX like function. I would suggest to use the POSIX like function.