francoismichel / ssh3

SSH3: faster and rich secure shell using HTTP/3, checkout our article here: https://arxiv.org/abs/2312.08396 and our Internet-Draft: https://datatracker.ietf.org/doc/draft-michel-ssh3/
https://arxiv.org/abs/2312.08396
Apache License 2.0
3.27k stars 82 forks source link

mesg: cannot open /dev/pts/6: Permission denied #64

Open glensc opened 9 months ago

glensc commented 9 months ago

appears openssh manages to make terminal owned by logged in user. also /etc/motd is not displayed with ssh3 and last login info

with ssh3:

$ ssh3 -privkey ~/.ssh/id_rsa niblus.local:444/ssh3-term
mesg: cannot open /dev/pts/6: Permission denied
glen@niblus:~ $ l `tty`
crw--w---- 1 root tty 136, 6 Dec 18 15:30 /dev/pts/6

with openssh

$ ssh niblus
Linux niblus 6.1.0-rpi6-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.58-1+rpt2 (2023-10-27) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Dec 14 18:06:21 2023 from 192.168.0.35

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

glen@niblus:~ $ l `tty`
crw--w---- 1 glen tty 136, 6 Dec 18 15:30 /dev/pts/6
francoismichel commented 9 months ago

Concerning the pty, I'll look into it soon, it would be better to have it owned by the user. Thanks for that !

Concerning motd, OpenSSH displays it when PAM is enabled and not when it is not. I did not look into it in details yet but I'll let that for when we add support for PAM.