Read system known_hosts file. #730

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

@roysmith

This patch provides a way to have fab read the system known_hosts file. This fixes the bug I reported to the mailing list in http://lists.gnu.org/archive/html/fab-user/2012-08/msg00017.html.

@bitprophet bitprophet commented on an outdated diff Sep 17, 2012
fabric/network.py
@@ -284,6 +284,14 @@ def connect(user, host, port):
# Init client
client = ssh.SSHClient()
+ # Load system hosts file (e.g. /etc/ssh/ssh_known_hosts)
+ try:
@bitprophet
bitprophet Sep 17, 2012 Member

This try/except can be condensed into simply:

known_hosts = env.get('system_known_hosts')

as env is a dict subclass :)

@bitprophet
Member

Please see comment; also please update the changelog too! Thanks :)

@roysmith

Just wondering what the status of this pull request is. I see that version 1.5.1 was released recently, but doesn't appear to include this patch. Are there plans to pick up this patch at some point?

@bitprophet
Member

Pro tip, if the ticket isn't "Closed", it's not been merged yet :) but that also usually means the plan is to do so and I just didn't get to it yet! Sorry for the delays.

Just did some touch-up on the changelog (new stuff goes at top, not bottom :)) and merging/testing now. Thanks!!

@bitprophet bitprophet added a commit that referenced this pull request Jan 23, 2013
@bitprophet bitprophet Fix changelog re #730 fc3b308
@bitprophet
Member

All set, will appear in 1.6.0 (next feature release). Which will be by end of month hopefully.

@bitprophet bitprophet closed this Jan 23, 2013
@roysmith

Cool, thanks. And my apologies for getting the changelog backwards.

On Jan 22, 2013, at 11:44 PM, Jeff Forcier wrote:

All set, will appear in 1.6.0 (next feature release). Which will be by end of month hopefully.


Reply to this email directly or view it on GitHub.

Roy Smith
roy@panix.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment