added exception handling on SSH