จาก bullseye เป็น bookworm
การ upgrade desktop ที่ใช้อยู่ ซึ่งประกอบไปด้วย notebook 2-3 เครื่อง ดูเหมือนว่าจะผ่านไปได้ด้วยดีจนน่าแปลกใจ ไม่มีอะไรผิดปกติ application ที่ใช้งานอยู่ ก็ใช้งานได้ทั้งหมด
ตัว Gnome desktop เปลี่ยนตำแหน่งของ Icon ที่ใช้ start app จากด้านซ้ายของ screen มาเป็นด้านล่าง ซึ่งทำให้การเคลื่อนของ mouse ไปเปิด app เปลี่ยนไปนิดหน่อย แต่อย่างอื่นก็ดูไม่ต่าง ในแง่ของการใช้งาน
ปัญหาเริ่มเกิด เมื่อต้องไป update ตัว server ซึ่งเป็น VM อยู่บน digital ocean ที่ใช้งานมาแล้วเกือบ 10 ปี (เริ่ม 2014) และด้วย config เก่าๆจำนวนมากที่ไม่ได้ update ตามไปด้วย
เรื่องแรกที่เป็นปัญหาเลยก็คือ openvpn config ที่เคยใช้งานได้ ทั้งสำหรับเครื่อง Linux debian อื่นๆ และ mikrotik swtich และ router ที่มีอยู่ 2-3 ตัว อยู่ๆ ก็ใช้งานไม่ได้ขึ้นมา มี error เกี่ยวกับ ชนิดของ cypher ระหว่างตัว client กับ server ที่ไม่ตรงกัน เลยทำให้เชื่อมต่อไม่ได้
ซึ่งเนื่องจากตัว mikrotik config ที่เกี่ยวกับ openvpn ไม่ได้เปลี่ยนเปลงอะไร งั้นปัญหาก็อยู่ที่ตัว debian server แหง
หลังจากงมอยู่พักนึง ก็พบว่า เดิมทีเพื่อที่ให้ config ตัวนี้ ใช้งานได้กับ mikrotik ก็ต้องจำกัด cypher ให้เหลือแค่ AES-256-CBC
พอ upgrade openvpn เป็น version ที่ใช้งานอยู่บน bookworm ก็ต้องเพิ่ม config ใหม่ “data-cyphers” ให้เป็นแบบเดียวกัน
cipher AES-256-CBC
data-ciphers AES-256-CBC
นอกจากนั้นก็เป็นปัญหาทั่วไปของ service บางอย่างที่ start ไม่ได้ เพราะ package ถูกถอนออกไป โดยไม่ได้ติดตั้งตัวทดแทน เช่น php-fpm และ mariadb ซึ่งพอติดตั้งกลับเข้าไปก็สามารถใช้งานได้
ปัญหาใหญ่ที่สุดที่เจอ ก็คือ ssh ซึ่งเดิมทีใช้ในการ connect เข้าไปที่ตัว mikrotik ได้ โดยใช้ public key ซึ่งใช้งานได้ดี อยู่ ๆ ก็ใช้งานไม่ได้ เครื่อง mikrotik จะถาม password ลอง setup password แล้ว ก็ดูเหมือนว่ายังใช้งานไม่ได้ เพราะ password ที่ป้อนเข้าไปไม่ถูกต้อง
ssh ที่ติดตั้งอยู่เดิมบน bullseye คือ openssh 8.4
ssh ที่ติดตั้งบน bookworm คือ openssh 9.2p1
หลังจากลองอยู่พักใหญ่ แล้วยังใช้งานไม่ได้ ก็เลย copy ตัว ssh binary จาก VM ที่ติดตั้ง bullseye เอาไว้ มาใช้งานปน server ก็ปรากฏว่าใช่งานได้ ก็เลย copy ไปไว้ใน ~/bin และ แก้ไข script ที่ใช้ในการ login เข้า mikrotik router ให้ใช้ ssh ตัวนี้แทน ก็เลยทำให้ script ที่ใช้งานอยู่กลับมาใช้งานได้เป็นปกติ
Edit: 2023-07-05
วันนี้เพิ่งเจอว่า ตอน openssh update เป็น 8.8 มีการเปลี่ยน config
openssh (1:8.8p1-1) unstable; urgency=medium
OpenSSH 8.8 includes a number of changes that may affect existing
configurations:
- This release disables RSA signatures using the SHA-1 hash algorithm by default. This change has been made as the SHA-1 hash algorithm is cryptographically broken, and it is possible to create chosen-prefix
hash collisions for <USD$50K.- For most users, this change should be invisible and there is no need to replace ssh-rsa keys. OpenSSH has supported RFC8332 RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys will automatically use the stronger algorithm where possible.
- Incompatibility is more likely when connecting to older SSH implementations that have not been upgraded or have not closely tracked improvements in the SSH protocol. For these cases, it may be necessary to selectively re-enable RSA/SHA1 to allow connection and/or user authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms options. For example, the following stanza in ~/.ssh/config will enable RSA/SHA1 for host and user authentication for a single destination
host old-host
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
สรุป เพิ่ม 2 บรรทัดนี้เข้าไปใน .ssh/config ก็จบ ใช้งาน openssh 9.1 กับ mikrotik ต่อไปได้