I want to have a user have sudo access without needing a password, so I did this.
sudo vi /etc/sudoers
Set this up:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
sudo service sudo restart
sudo adduser sudo
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
sudo service sudo restart
sudo adduser sudo
ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/Users/client/.ssh/id_rsa): /Users/client/.ssh/new_keyEnter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /Users/client/.ssh/new_key.Your public key has been saved in /Users/client/.ssh/new_key.pub.
/Users/client/.ssh/new_key (private)/Users/client/.ssh/new_key.pub (public)
cat /home/john/new_key.pub >> /home/john/.ssh/authorized_keysNow the user can login using their private key.
ssh -i /Users/client/.ssh/new_key john@myserver.com
#!/bin/bash #This silly script was written by @bentaylordata to handle auto restarting of processes in cron #Check if string is running string_of_interest="ipython" OUTPUT="$(ps -ef | grep $string_of_interest | wc -l)" if [ "$OUTPUT" -gt "1" ] then echo "started" else echo "need to start" ipython notebook --profile=nbserver --no-mathjax & #This backgrounds the notebook server fi