2021年6月12日 星期六

Linux systemd console autologin

編輯 /usr/lib/systemd/system/getty@.service
把原來的 ExecStart 改成
ExecStart=-/sbin/agetty -a root %I $TERM
-a 表示 autologin
若不想要用 root ,可改用其他 user

單行設定指令
sed -i 's/ExecStart.*/ExecStart=-\/sbin\/agetty -a root %I \$TERM/' /usr/lib/systemd/system/getty@.service

沒有留言:

New SSH client to old SSH server

從新版 SSH 8.x 連到舊版 6.x SSH server 若出現 Unable to negotiate with x.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss ...