Enabling Remote Login on OSX


#1

Hi,

I’m trying to enable remote login (ie sshd) on Mountain Lion.

I’ve tried:

service “sshd” do

action [:enable, start]

end

And variations on that theme (ssh, remotelogin, only start).

The only one which didn’t result in an error was sshd, but that didn’t
result in sshd actually starting.

Wiki and Google offer no significant guidance. Anyone got this working?
What incantation did you use?

-aob


#2

execute “enable ssh” do
command "systemsetup -setremotelogin on"
action :run
end


Robert Christensen
Instructional Media Specialist
Instructional Media Services – A division of ITS
Wesleyan University


From: Angus Buchanan [angus.o.buchanan@gmail.com]
Sent: Friday, March 01, 2013 2:29 PM
To: chef@lists.opscode.com
Subject: [chef] Enabling Remote Login on OSX

Hi,

I’m trying to enable remote login (ie sshd) on Mountain Lion.

I’ve tried:

service “sshd” do

action [:enable, start]

end

And variations on that theme (ssh, remotelogin, only start).

The only one which didn’t result in an error was sshd, but that didn’t result in sshd actually starting.

Wiki and Google offer no significant guidance. Anyone got this working? What incantation did you use?

-aob


#3

Slight change to Robert’s answer, to make it idempotent so it’s not an
updated resource on every run:

execute “enable ssh” do
command "/usr/sbin/systemsetup -setremotelogin on"
not_if "/usr/sbin/systemsetup -getremotelogin | /usr/bin/grep On"
action :run
end

On Fri, Mar 1, 2013 at 1:47 PM, Christensen, Robert <
rchristensen@wesleyan.edu> wrote:

execute “enable ssh” do
command "systemsetup -setremotelogin on"
action :run
end


Robert Christensen
Instructional Media Specialist
Instructional Media Services – A division of ITS
Wesleyan University

From: Angus Buchanan [angus.o.buchanan@gmail.com]
Sent: Friday, March 01, 2013 2:29 PM
To: chef@lists.opscode.com
Subject: [chef] Enabling Remote Login on OSX

Hi,

I’m trying to enable remote login (ie sshd) on Mountain Lion.

I’ve tried:

service “sshd” do

action [:enable, start]

end

And variations on that theme (ssh, remotelogin, only start).

The only one which didn’t result in an error was sshd, but that didn’t
result in sshd actually starting.

Wiki and Google offer no significant guidance. Anyone got this working?
What incantation did you use?

-aob


Joshua Buysse, System Engineer
College of Liberal Arts, Office of Information Technology
University of Minnesota

“On two occasions I have been asked, ‘Pray, Mr. Babbage, if you
put into the machine wrong figures, will the right answers come
out?’ I am not able rightly to apprehend the kind of confusion of
ideas that could provoke such a question.”

  • Charles Babbage

#4

Thank both.

Helpful.

-aob

On Fri, Mar 1, 2013 at 7:53 PM, Joshua Buysse buysse@umn.edu wrote:

Slight change to Robert’s answer, to make it idempotent so it’s not an
updated resource on every run:

execute “enable ssh” do
command "/usr/sbin/systemsetup -setremotelogin on"
not_if "/usr/sbin/systemsetup -getremotelogin | /usr/bin/grep On"
action :run
end

On Fri, Mar 1, 2013 at 1:47 PM, Christensen, Robert <
rchristensen@wesleyan.edu> wrote:

execute “enable ssh” do
command "systemsetup -setremotelogin on"
action :run
end


Robert Christensen
Instructional Media Specialist
Instructional Media Services – A division of ITS
Wesleyan University

From: Angus Buchanan [angus.o.buchanan@gmail.com]
Sent: Friday, March 01, 2013 2:29 PM
To: chef@lists.opscode.com
Subject: [chef] Enabling Remote Login on OSX

Hi,

I’m trying to enable remote login (ie sshd) on Mountain Lion.

I’ve tried:

service “sshd” do

action [:enable, start]

end

And variations on that theme (ssh, remotelogin, only start).

The only one which didn’t result in an error was sshd, but that didn’t
result in sshd actually starting.

Wiki and Google offer no significant guidance. Anyone got this
working? What incantation did you use?

-aob


Joshua Buysse, System Engineer
College of Liberal Arts, Office of Information Technology
University of Minnesota

“On two occasions I have been asked, ‘Pray, Mr. Babbage, if you
put into the machine wrong figures, will the right answers come
out?’ I am not able rightly to apprehend the kind of confusion of
ideas that could provoke such a question.”

  • Charles Babbage