[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Minor feature additions
[Thread Prev] | [Thread Next]
- Subject: Minor feature additions
- From: Chris Backas <chb@xxxxxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 7 Jul 2009 15:05:11 -0400
- To: libssh@xxxxxxxxxx
Hello all,I'm currently upgrading from libssh 0.2 to 0.3, and in the process I'm looking at some minor tweaks we'd previously made for our needs to ensure that they'll work the same way after the upgrade. I thought that perhaps I should mention them here to see if they were something that would be generally useful to others.
Some background on how we most often use libssh. Typically we're dialing into (yes, with modems) remote systems all night long, establishing PPP, and then connecting to the remote host with SSH to perform some automated operations. Due to the nature of these systems, more often than not they have the same IP as one another over the PPP link (IE: They'll all be, say, 10.20.10.1) but obviously have different signatures. It is also typically the case that we don't have DNS facilities for this. Anyway, our tweaks:
1) The known hosts file: Current libssh considers it an error condition if this does not exist. I don't really see why, but it causes us problems on our production machines because typically no one's ever run ssh on them directly before, so the file isn't there to begin with. We see no reason to have to go around to every machine and ensure this file exists first, so I did a simple modification in the 0.2 release that changes "file not found" in ssh_parse_knownhost() from an error condition to a simple "return NULL", meaning "No match found".
Could there be a simple option which determines whether not having a known hosts file is a real problem?
2) In getai(), it saves a lot of futile DNS querying time to do something like this:
hints.ai_flags |= AI_NUMERICHOST;Obviously, if you know ahead of time that you're supplying a plain IP Address. Could there be a way to tell libssh that this is the case and add that flag to the hints conditionally?
Thoughts? Chris Backas Software Developer Bristol Capital, Inc.
Re: Minor feature additions | Andreas Schneider <mail@xxxxxxxxxxxx> |
Re: Minor feature additions | Aris Adamantiadis <aris@xxxxxxxxxxxx> |