def parse_ssh_destination(destination):
match = _re_ssh.match(destination)<EOL>if not match:<EOL><INDENT>raise InvalidDestination("<STR_LIT>" % destination)<EOL><DEDENT>user, password, host, port = match.groups()<EOL>info = {}<EOL>if user:<EOL><INDENT>info['<STR_LIT:username>'] = user<EOL><DEDENT>else:<EOL><INDENT>info['<STR_LIT:username>'] = getpass.getuser()<EOL><DEDENT>if password:<EOL><INDENT>info['<STR_LIT:password>'] = password<EOL><DEDENT>if port:<EOL><INDENT>info['<STR_LIT:port>'] = int(port)<EOL><DEDENT>info['<STR_LIT>'] = host<EOL>return info<EOL>
Parses the SSH destination argument.