From f6275d7fbb81a045f90ad2240c3c639ae37ac02b Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 5 Sep 2014 11:43:04 -0400 Subject: [PATCH] detect fqdn hosts against fqdn hosts Closes #5 --- remoto/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remoto/connection.py b/remoto/connection.py index e15fc4c..faafd3d 100644 --- a/remoto/connection.py +++ b/remoto/connection.py @@ -121,6 +121,9 @@ def needs_ssh(hostname, _socket=None): of its FQDN. """ _socket = _socket or socket + fqdn = _socket.getfqdn() + if hostname == fqdn: + return False local_hostname = _socket.gethostname() local_short_hostname = local_hostname.split('.')[0] if local_hostname == hostname or local_short_hostname == hostname: -- 2.47.3