我们的用户希望通过SSH能够远程登陆到自己的苹果电脑,如何设置可以让他可以通过当前账号使用ssh登陆到自己苹果电脑。
Solved
如何为MAC用户后台开启ssh远程登陆
Best answer by Hugonaut
I hope google translate got this right. I doubt its 100%.
Google Translation: Our users want to be able to remotely log in to their Apple computer via SSH. How to set it up allows him to log in to his Apple computer using ssh from his current account.
https://www.techrepublic.com/article/pro-tip-how-to-enable-ssh-via-terminal/
Try This -
#!/bin/sh
sudo systemsetup -f -setremotelogin on
From the Man Page
-setremotelogin [-f] on | off Sets remote login (SSH) to either on or off. Important If you turn off remote login, you won't be able to administer the server using remote command line tools and SSH. To turn remote login back on, you'll need to connect a monitor and keyboard to the server to administer it locally. Use "setremotelogin -f off" to suppress prompting when turning remote login off.
Once enabled - in terminal type & then enter yes, and then enter the password
ssh user@COMPUTERipAddress
[user@]host[:port] Connect to the target host by first making a ssh connection to the jump host and then establishing a TCP forwarding to the ulti- mate destination from there. Multiple jump hops may be specified separated by comma characters. This is a shortcut to specify a ProxyJump configuration directive.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
