fixed sigint issue
refactoring ssh
ssh tweaks