summaryrefslogtreecommitdiff
path: root/src/share/m/ssh_proxycommand
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-07-24 12:54:03 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-07-24 12:54:03 -0400
commit1639adf5465b47336075f9b51e2a58a06aecf130 (patch)
tree138c50f112f1296895dba3b2d3dde589c063a58f /src/share/m/ssh_proxycommand
parentb4296a152643b5c759beb7c2604812417cad0928 (diff)
make sure we check for the host key existence in the correct known_hosts file.
do not look for a host key in a non-existant file. (should close MS 1147)
Diffstat (limited to 'src/share/m/ssh_proxycommand')
-rw-r--r--src/share/m/ssh_proxycommand3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/share/m/ssh_proxycommand b/src/share/m/ssh_proxycommand
index 01ca488..c90074b 100644
--- a/src/share/m/ssh_proxycommand
+++ b/src/share/m/ssh_proxycommand
@@ -231,8 +231,7 @@ if gpg_user --list-key ="${URI}" &>/dev/null ; then
# if the host is NOT in the keyring...
else
# if the host key is found in the known_hosts file...
- # FIXME: this only works for default known_hosts location
- hostKey=$(ssh-keygen -F "$HOST" 2>/dev/null)
+ hostKey=$( [ ! -r "$KNOWN_HOSTS" ] || ssh-keygen -F "$HOST" -f "$KNOWN_HOSTS" 2>/dev/null)
if [ "$hostKey" ] ; then
# do not check the keyserver