Moved proposed ssh_port setting to _prepare_and_extract

Avoiding the repetitive handling of this.