sudo apt install dropbear-initramfs
# /usr/share/doc/dropbear-initramfs/README.initramfs:# > Command line options are taken from the $DROPBEAR_OPTIONS variable. For# > instance add DROPBEAR_OPTIONS="-p 2222" to /etc/dropbear/initramfs/dropbear.conf# > to change the listening port to 2222.
sudo vi /etc/dropbear/initramfs/dropbear.conf
# if you want to change port:# DROPBEAR_OPTIONS="-p 2222"# /usr/share/doc/dropbear-initramfs/README.initramfs:# > Password logins are disabled. Public key(s) used for authentication are taken# > from /etc/dropbear/initramfs/authorized_keys, or from# > /etc/dropbear/initramfs/id_{dsa,rsa,ecdsa,ed25519}.pub if the former# > does not exist. A warning is raised if no authorized keys could be# > found.
sudo vi /etc/dropbear/initramfs/authorized_keys # paste ssh-pc's public key (~/.ssh/id_ed25519.pub)# /usr/share/doc/dropbear-initramfs/README.initramfs:# > Don't forget to run update-initramfs when you changed the config to make it# > effective!# > # update-initramfs -u -k all
sudo update-initramfs -u -k all
#update-initramfs: Generating /boot/initrd.img-5.15.0-56-generic#W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu#update-initramfs: Generating /boot/initrd.img-5.15.0-43-generic#W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu#W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
sudo reboot
new-pc: stopiing at “Please unlock disk nvme0n1p3_crypt”
Since by default the initramfs' host keys differ from those of the main SSH
server, SSH clients such as OpenSSH's might issue a "REMOTE HOST IDENTIFICATION
HAS CHANGED!" warning. In that case you might want to use another port for the
initramfs SSHd, and/or the "UserKnownHostsFile" option to specify an
alternative known_hosts file:
$ ssh -F ~/.luks/ssh.conf remote.system.com
$ cat ~/.luks/ssh.conf
Host *
User root
UserKnownHostsFile ~/.luks/known_hosts
PasswordAuthentication no
IdentityFile ~/.ssh/id_rsa
mkdir ~/.luks/
vi ~/.ssh/config
: <<'CONF'
Host new-pc-decrypt
HostName NEW_PC_IP
User root
UserKnownHostsFile ~/.luks/known_hosts
# if DROPBEAR_OPTIONS="-p 2222":
# Port 2222
CONF
ssh new-pc-decrypt echo ok # ok## > You can then unlock the disk remotely via SSH with# ># > ssh -tF ~/.luks/ssh.conf root@remote.system.com cryptroot-unlock# ># > Or, using a local gpg-encrypted key file:# ># > gpg --decrypt ~/.luks/remote.key.gpg | ssh -TF ~/.luks/ssh.conf root@remote.system.com cryptroot-unlock
ssh -t new-pc-decrypt cryptroot-unlock
#Please unlock disk nvme0n1p3_crypt:#cryptsetup: nvme0n1p3_crypt set up successfully
apt upgrade
1
2
3
sudo apt update
sudo apt upgrade
sudo reboot
gsettings
1
2
3
4
5
6
7
# [screen-saver-2h]
gsettings get org.gnome.desktop.session idle-delay # uint32 300
gsettings set org.gnome.desktop.session idle-delay 7200# win+right drag to resize
gsettings get org.gnome.desktop.wm.preferences resize-with-right-button # false
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
mkdir /tmp/vnc/;cd /tmp/vnc/
wget https://www.realvnc.com/download/file/vnc.files/VNC-5.3.3-Linux-x64-DEB.tar.gz
tar xvf VNC-5.3.3-Linux-x64-DEB.tar.gz # VNC-Server-5.3.3-Linux-x64.deb VNC-Viewer-5.3.3-Linux-x64.deb
sudo dpkg -i VNC-Server-5.3.3-Linux-x64.deb
#Selecting previously unselected package realvnc-vnc-server.#(Reading database ... 399211 files and directories currently installed.)#Preparing to unpack VNC-Server-5.3.3-Linux-x64.deb ...#Unpacking realvnc-vnc-server (5.3.3.27908) ...#Setting up realvnc-vnc-server (5.3.3.27908) ...#Updating /etc/pam.d/vncserver#Updating /etc/pam.conf... done##NOTICE: common configuration in /etc/pam.d contains the following modules:# pam_sss.so#The default vncserver PAM configuration only enables pam_unix. See #`man vncinitconfig' for details on any manual configuration required.##Looking for font path... not found.#Generating private key... done#Installed systemd unit for VNC Server in Service Mode daemon#Start or stop the service with:# systemctl (start|stop) vncserver-x11-serviced.service#Mark or unmark the service to be started at boot time with:# systemctl (enable|disable) vncserver-x11-serviced.service##Installed systemd unit for VNC Server in Virtual Mode daemon#Start or stop the service with:# systemctl (start|stop) vncserver-virtuald.service#Mark or unmark the service to be started at boot time with:# systemctl (enable|disable) vncserver-virtuald.service##Processing triggers for shared-mime-info (2.1-2) ...#Processing triggers for man-db (2.10.2-1) ...#Processing triggers for hicolor-icon-theme (0.17-2) ...#Processing triggers for mailcap (3.70+nmu1ubuntu1) ...#Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...#Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
sudo vnclicense -add <LICENSE> # License key <Free> has been successfully applied.
sudo vncpasswd -service
#Setting "Password" VNC parameter for Service Mode server#Password:#Verify:#Successfully set "Password" VNC parameter in /root/.vnc/config.d/vncserver-x11#Please note users of third party VNC Viewer projects will be able to connect by#entering the first 8 characters of this password only.
sudo systemctl status vncserver-x11-serviced.service # disabled, inactive
sudo systemctl status vncserver-virtuald.service # disabled, inactive
sudo systemctl start vncserver-x11-serviced.service
sudo lsof -nP -i:5900
#COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME#vncserver 9520 root 10u IPv6 145879 0t0 TCP *:5900 (LISTEN)#vncserver 9520 root 11u IPv4 145880 0t0 TCP *:5900 (LISTEN)
fish
1
2
3
4
5
6
7
8
9
10
# on ssh-pc:
ssh NEW_PC_IP 'mkdir -pv ~/.local/share/fish/'
scp ~/.local/share/fish/{fish_history,fish_read_history} NEW_PC_IP:~/.local/share/fish/
ssh NEW_PC_IP 'mkdir -pv ~/go/bin/'
scp ~/go/bin/powerline-go NEW_PC_IP:~/go/bin/
scp ~/go/bin/peco NEW_PC_IP:~/go/bin/
ssh NEW_PC_IP 'mkdir -pv ~/opt/dummy/{bin/,sbin/,share/man/}'# on new-pc:
fish
Include applications from the current workspace only,
Include applications from all monitors
Privacy
File History & Trash
Automatically Delete Temporary Files: YES
Screen: Screen Lock
Blank Screen Delay: 2 hours (see [screen-saver-2h])
Automatic Screen Lock: YES
Automatic Screen Lock Delay: 1minute
Lock Screen on Suspend: YES
Show Notifications on Lock Screen: no
Online Accounts
Sharing
Sound
Power
Displays
Mouse & Touchpad
Keyboard: Keyboard Shortcuts: View and Customize Shortcuts: Navigation: Hide all normal Windows: Ctrl+Super+D: (it’s defalt; but without this (explicitly setting “Ctrl+SuperD”), Ctrl+Alt+D also does this function – seems BUG (TODO: reporting))
Although tcpdump is not related to wireshark/tshark/dumpcap
(except that Guy Harris maintains the both project),
Users who can run wireshark should be able to run tcpdump.
So I use wireshark user for tcpdump.
mkdircd /tmp/jb/
wget https://download-cdn.jetbrains.com/toolbox/jetbrains-toolbox-1.24.11947.tar.gz
tar xvf jetbrains-toolbox-*.tar.gz
# GUI
/tmp/jb/jetbrains-toolbox-*/jetbrains-toolbox
# installed in ~/.local/share/JetBrains/Toolbox/, so /tmp/jetbrans... can be removed