如何为MAC用户后台开启ssh远程登陆

gaofei
New Contributor II

我们的用户希望通过SSH能够远程登陆到自己的苹果电脑,如何设置可以让他可以通过当前账号使用ssh登陆到自己苹果电脑。

1 ACCEPTED SOLUTION

Hugonaut
Valued Contributor

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.
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman

View solution in original post

3 REPLIES 3

Hugonaut
Valued Contributor

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.
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman

View solution in original post

ryan_ball
Valued Contributor

This is a great example of how Jamf Nation members go the extra mile to help others.

gaofei
New Contributor II

非常感谢你的支持!这个方法是正确的。
https://www.techrepublic.com/article/pro-tip-how-to-enable-ssh-via-terminal/