Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation – The Geek Diary
ssh, scp or sftp to a node that doesn't appear in DNS or /etc/hosts file is slow to make initial connection. After the connection is established, the speed is as expected. There are two cases to consider, see below. Note that in most environments this issue will not occur since IPs will be in /etc/hosts or DNS.