Now creates ssh connection
Added flag handeling