21 October 2020

AWS Lightsail ssh web trouble - ubuntu

After upgrading Ubuntu 18.04 LTS to 20.04 LTS ssh via web is broken.

ssh via putty still worked.

I have found the solution here:

https://help.okta.com/en/prod/Content/Topics/Adv_Server_Access/docs/sftd-ubuntu.htm

For servers running Ubuntu 20.04, you have to allow certificate authorities (CAs) to use the ssh-rsa algorithm to sign certificates. To do this, add the following line to your OpenSSH daemon file (which is either /etc/ssh/sshd_config or a drop-in file under /etc/ssh/sshd_config.d/)

To fix it, add following 2 lines to /etc/ssh/sshd_config

TrustedUserCAKeys /etc/ssh/xxxxxxx 
CASignatureAlgorithms +ssh-rsa

Replace xxxxxxx by the public key you can find in /etc/ssh

The public key file is probably called lightsail_instance_ca.pub

Restart sshd service after changing the sshd_config file:

sudo service sshd stop
sudo service sshd start

OR

sudo service sshd restart

Tip: To find the non-comment lines in sshd_config:

grep '^[[:blank:]]*[^[:blank:]#;]' /etc/ssh/sshd_config

Include /etc/ssh/sshd_config.d/*.conf
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
TCPKeepAlive yes
ClientAliveInterval 30
AcceptEnv LANG LC_*
Subsystemsftp/usr/lib/openssh/sftp-server
TrustedUserCAKeys /etc/ssh/xxxxxxx
CASignatureAlgorithms +ssh-rsa

02 October 2020

WSL Debian

 Install Windows subsystem linux on Windows 10


step 1: 

  install Debian Linux subsystem:

    - PowerShell as administrator: "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux" | go to "turn windows future on or off"

    - Microsoft Store: install "Debian"


step 2: 

  install mate tesktop on Debian:

    - open Debian

    - sudo apt-get update

    - sudo apt install task-mate-desktop


OR

  install mate desktop on Ubuntu:

    - open ubuntu console

    - sudo apt install tasksel

    - sudo apt update

    - sudo tasksel install ubuntu-mate-desktop

    

step 3: 

  install VcXsrv in windows 10:

    - download from: https://sourceforge.net/projects/vcxsrv/

      - about X server: https://en.wikipedia.org/wiki/X_Windo...

    - open XLauch

      - select: "One large window"

      - Display number: 0

      - next

      - Start no client

      - next 

      - finish


step 4: 

  setup display: 

    - export DISPLAY=:0

    - export LIBGL_ALWAYS_INDIRECT=1


step 5: 

  start Mate-desktop environment: 

    - mate-session