refactor SSH#run channel_exec proc into it's own function