Linux

ubuntu upgrade 22.04 up to 23.04

PSAwesome 2023. 6. 24. 11:06
반응형

# 업데이트

sudo apt update && sudo apt upgrade
do-release-upgrade

 

# 업데이트 후 노트북 덮개 닫아도 대기모드 진입하지 않도록 변경

# sudo vim /etc/systemd/logind.conf


[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=ignore
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore

HandleLidSwitch=ignore

#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%​

 

# ssh pub key 등록 % 기본 포트 변경

# sudo vim /etc/ssh/sshd_config

Port 5678
PubkeyAuthentication yes  # id_rsa.pub 내용을 .ssh/authrized_keys 안에 붙여넣기 해서 로그인 하기
AuthorizedKeysFile      .ssh/authorized_keys .ssh/authorized_keys2
PasswordAuthentication no # password 인증 불가

 

# ssh socket 설정 (기본 포트 변경할 경우)

# zsh인 경우
sudo chown ps:ps /etc/systemd/system/ssh.socket.d/listen.conf

sudo cat > /etc/systemd/system/ssh.socket.d/listen.conf << EOF
[Socket]
ListenStream=
ListenStream=5678
EOF

sudo systemctl restart systemd-logind

 

반응형