Home Forums OS X Server and Client Discussion Questions and Answers how can I enable remote login with a shell script?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #379174
    yagmot
    Participant

    I’m building a post-flight script in a package that gets installed via DeployStudio. I’ve figured out how to enable Remote Management in my script, but I’m not finding any good info on how to enable Remote Login (ssh). Any ideas?

    Thanks!

    #379398
    fherbert
    Participant

    Use systemsetup (man systemsetup for more info)

    Usage: systemsetup -getremotelogin
    Display whether remote login is on or off.

    Usage: systemsetup -setremotelogin
    Set remote login to either
    or . Use “systemsetup -f -setremotelogin off” to suppress prompting when turning remote login off.

    #379401
    yagmot
    Participant

    actually that doesn’t work. here’s how to do it.

    dseditgroup -o create -a YourUserName -t user -u YourUserName -P YourPassword -q com.apple.access_ssh
    launchctl load -w /System/Library/LaunchDaemons/ssh.plist

    #379522
    malroy
    Participant

    Hi Yagmot can i hack your post and ask the same question with a twist

    does anyone know how to disable SSH in 10.4,10.5 and 10.6 in shell script ?

    Thanks
    Roy

    #379685
    tlarkin
    Participant

    The systemsetup command can force SSH off. Also there is a disabled ssh group that already exists in directory services

    [code]
    bash-3.2# dscl . list /Groups | grep ssh
    _sshd
    com.apple.access_ssh-disabled
    [/code]

    However, I believe ARD Admin uses SSH for authentication so you may not want to turn it off but rather restrict usage to a particular account.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed