Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux [2019/06/25 20:02] paul |
linux [2019/12/28 23:23] (current) |
||
---|---|---|---|
Line 11: | Line 11: | ||
sudo adduser usernameyoulike | sudo adduser usernameyoulike | ||
# give the user any temp password | # give the user any temp password | ||
+ | # the following command removes the password | ||
sudo passwd -d usernameyoulike | sudo passwd -d usernameyoulike | ||
+ | # add the user to the sudoers list | ||
usermod -aG sudo usernameyoulike | usermod -aG sudo usernameyoulike | ||
</ | </ | ||
+ | |||
===== udev ===== | ===== udev ===== | ||
Line 290: | Line 293: | ||
+ | ====== Window File Subsystem for Linux ====== | ||
+ | |||
+ | This thing is awesome! | ||
+ | |||
+ | For setting up ssh keys, xclip doesn' | ||
+ | <code bash> | ||
+ | clip.exe < ~/ | ||
+ | </ | ||
+ | |||
+ | ===== SSH Access ===== | ||
+ | |||
+ | For setting up external ssh access I did the following: | ||
+ | |||
+ | Reinstall openssh for some reason: | ||
+ | <code bash> | ||
+ | sudo apt-get purge openssh-server | ||
+ | sudo apt-get install openssh-server | ||
+ | </ | ||
+ | |||
+ | From an elevated powershell I ran this to change the port to 2222 to not | ||
+ | interfere with any windows services: | ||
+ | <code bash> | ||
+ | New-NetFirewallRule -DisplayName "Allow Inbound Port 2222" -Direction Inbound -LocalPort 2222 -Protocol TCP -Action Allow | ||
+ | </ | ||
+ | |||
+ | I added the following to sshd_config: | ||
+ | |||
+ | <code bash> | ||
+ | Port 2222 | ||
+ | PermitRootLogin no | ||
+ | AllowUsers paul | ||
+ | </ | ||
+ | |||
+ | I created an authorized hosts file and imported the keys. | ||
+ | |||
+ | I tested the connection by running this on the server: | ||
+ | <code bash> | ||
+ | sudo service ssh stop | ||
+ | sudo / | ||
+ | </ | ||
+ | |||
+ | Then on the client I ran a debug version of an ssh server to see if I was | ||
+ | receiving incoming connections. | ||
+ | <code bash> | ||
+ | ssh name@server -p 2222 | ||
+ | </ | ||
+ | |||
+ | I then monitored the server and make sure I could see the connection. The debug | ||
+ | client quit out cause it didn't have correct paths to the keys, but the test was | ||
+ | a success cause it validated the port pass through. I then restarted the regular | ||
+ | service like this: | ||
+ | |||
+ | <code bash> | ||
+ | sudo service ssh start | ||
+ | </ | ||