added port and ssh-settings, improved errorhandling