avoid pty creation unless we are doing sudo over ssh

Signed-off-by: Steve Loranz <sloranz@redhat.com>