public String extractUserName() {
        final String username = getUsername();
        if (null != username && !"".equals(username)) {
            return username;
        }
        return extractUserName(getHostname());
    }
public String extractUserName ( ) { final String username = getUsername ( ) ; if ( null != username && ! "" . equals ( username ) ) { return username ; } return extractUserName ( getHostname ( ) ) ; }
Gets the username for remote connections. The following logic is used: If the username property is set then the
username value is returned. If the username is not set and the hostname contains a "user@" prefix then the "user"
substring is returned If the hostname contains a substring that looks like a port (eg, :22) the port is stripped
off

@return Gets the username for remote connections