started refactoring ssh connection creation