Results 1 to 3 of 3

Thread: SSH & keys + SUDO = problem

  1. #1
    Join Date
    May 2010
    Beans
    148

    SSH & keys + SUDO = problem

    So what I want to do is something like this W/O a password:
    Code:
    ssh -t user@remotemachine sudo /usr/bin/killall synergyc
    I have the following as the last line of my sudoers file on remotemachine:
    Code:
    user ALL=(ALL) NOPASSWD:/usr/bin/killall synergyc,/opt/scripts/restartSynergy.sh
    Problem is that sudo still prompts me for a password. :-/
    Note: if I ssh over there first and then execute it, it's not a problem.

    What am I screwing up?

  2. #2
    Join Date
    May 2010
    Beans
    148

    Re: SSH & keys + SUDO = problem

    It works now that I've moved the sudo commands to inside the scripts. Inefficient, IMHO but maybe there's a security issue here?

  3. #3
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: SSH & keys + SUDO = problem

    What's the security issue?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •