sudo apt install openssh-server
sudo vi /etc/ssh/sshd_config
#PasswordAuthentication yes
# -- end of file
#AllowUsers afinnell
sudo vi /etc/sudoers
Edit:
# after $sudo ALL=(ALL:ALL) ALL
#%sudo ALL=NOPASSWD: /usr/sbin/sshd
sudo service ssh start
# or full restart
sudo service ssh --full-restart
- Task Scheduler
- New Basic Task
- Trigger: On User Logon
- Program:
%windir%\System32\bash.exe
- Arguments:
-c "/etc/init.d/ssh start
sudo adduser --create-home -s /bin/bash git
sudo su - git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys