2. Set up the source machine to allow the sudo command to be executed without prompting for a password, and without requiring a real tty, for example:The sudoers file is attached as a screenshot.
b. Add the following entry to /etc/sudoers to replace username with the non-root user's name:
username ALL=(ALL) NOPASSWD: ALL
c. Make sure the following entry is not present in the /etc/sudoers file:
In case the file contains this entry, comment it out.
Note: The sudoers configuration might vary by system. For Ubuntu operating systems further configuration is needed. Target the specific user you are using and assign it user id 0/group 0. Ensure that you also enable Allow root to ssh even though you are not using the rootaccount.
From novice to tech pro — start learning today.