我允许远程ssh登录到我的Mac。但是我只能在运行命令who时看到我的本地登录。我确定远程会话已通过ssh登录我的Mac。
localhost% who
kane console Jul 10 22:21
kane ttys000 Jul 10 22:21
kane ttys001 Jul 10 22:21
kane ttys002 Jul 10 22:21
kane ttys003 Jul 10 22:21
在linux主机中,它通过以下命令登录我的Mac,
user 12098 11413 0 21:01 ? 00:00:00 /usr/bin/ssh -L 27002:127.0.0.1:27002 -R 27002:127.0.0.1:27003 -q -N -o stricthostkeychecking=no -R 20008:localhost:6500 -R 20002:localhost:22 username@myhost.com
但是在linux主机上,who命令可以列出ssh登录。如何在Mac上列出远程ssh登录?
user@ubuntu-server:~$ who
user tty1 2012-07-05 18:26
user pts/1 2012-07-23 22:10 (123.120.xxx.xxx)