ansible/ansible — pull request #813 by willthames (2012-08-09 01:50:32+00:00)
Title: Allowed ssh to determine username and port from ~/.ssh/config

Currently that config file can only be overridden by environment variable
Stopped remote_user, remote_port having global defaults - really they
should be determined per host

I have tested this pull request using standard paramiko connection and --connection ssh. Because that connection uses the command line ssh, which respects .ssh/config, there is no longer a need to set the user explicitly unless the user overrides with -u. However, there is a potentially breaking change in that user no longer defaults to root (for the ssh connection only - paramiko uses User from .ssh/config, and DEFAULT_USER if that returns nothing and -u is not set). As ssh'ing as root is terrible from a security point of view I'm not convinced that this is necessarily a terrible thing but I really don't know what proportion of people rely on ssh'ing as root using the non-paramiko ssh connection.