New answers tagged

1

For anyone from the future .. bash can be run with -l to execute full login goodies. So, my launchd script goes from; <ProgramArguments> <array> <string>java</string> <string>-jar</string> <string>jenkins.war</string> </array> ... to ... <ProgramArguments> ...


0

You can force Terminal to become frontmost by adding the line: activate application "Terminal" into your applescript. if you launch Terminal with: tell application "Terminal" to open location "ssh://user@example.com" then Terminal won't open an extra window.


0

https://github.com/nomad/houston It supports simple command line interface too. Very useful and free.


1

The documentation lacks one important step: reboot or sudo reboot After the reboot the user enjoys visible admin rights in System Preferences -> Users and Groups. But: even without rebooting the user is admin already - it's just not visible in the PrefPane. If you login as joeadmin immediately after creating the account (e.g. fast user switching) ...


0

I know this is an old question, but I just found a non-obvious answer. In my case, running sudo shutdown -r would cause the message to be printed, but no shutdown would happen as the OP said. Turns out, running shutdown -r without sudo caused the restart to happen. Hope this helps!


1

Looking at the List of job scheduler software at WikipediA which support event driven job scheduling and lists OS X as a Platform was only one package, JobServer by Grand Logic. Being that this info is from WikipediA, this of course by no means is necessarily a complete and or authoritative list, however it's a place to start.


0

I was editing the wrong configuration file! Instead of /etc/ssh_config, I edited private/etc/sshd_config. I think this probably would have also worked if I edited /etc/sshd_config as per the updated answer from @GhostLyrics, but I didn't test that yet so I can't say for sure. After that, I restarted the service with sudo launchctl stop com.openssh.sshd and ...


1

/etc/ssh/ssh_config is the configuration file for the client which is used if you don't have a more specific one in your home directory. What you want to edit is /etc/ssh/sshd_config which is the one for the server. You will probably want to set PermitRootLogin without-password (or no) and PasswordAuthentication no there. Update: Since you are running ...


0

On Mac OS X El Capitan the ssh-add command can do this with a -K option: $ ssh-add -K ~/.ssh/id_rsa Enter passphrase for /Users/your.username/.ssh/id_rsa: You can paste your password into this prompt with ⌘-V. A session for this looks like this: $ ssh-add -K ~/.ssh/id_rsa Enter passphrase for /Users/your.username/.ssh/id_rsa: Passphrase stored in ...


4

You got it the wrong way round :-) create a key pair on the Mac you are using put both id_rsa.pub and id_rsa into ~/.ssh and run chmod 600 id_rsa append the generated public key (id_rsa.pub) to .ssh/authorized_keys on the remote machine (your server in this case). If you are allowed to login in via ssh using a password, use ssh remoteuser@remotemachine ...


3

You can create a low-numbered user via dscl, as per this Apple support page and it will be hidden from most views. Also, I believe that if you set the user home directory to something like /var/empty then ssh will log in but the gui will not.


3

Set up your new User as a Sharing Only account, this gives them no actual account on the computer itself that they can log into… System Prefs > Users & Groups Click the lock Click the + sign to add a new User Set the new account to sharing only from the drop menu [stepped out on the pic for clarity] Ref : Apple KB - OS X Yosemite: Create a ...


1

Create a file /bin/rbash, make it executable and and set it as a shell for this newly created user: #!/bin/bash exec /bin/bash -r "$@" The user over ssh is limited as manual page for bash describes in "RESTRICTED SHELL" section.


0

To be able to modify certain directories/files in OS X El Capitan you have to disable System Integrity Protection (SIP) AKA “rootless”: Reboot your Mac into Recovery Mode by restarting your computer and holding down cmd+R until the Apple logo appears on your screen. In the menubar click Utilities > Terminal. In the Terminal window, type in csrutil disable. ...


2

You need to make sure that the <the directory path> fulfils the next requirement specified in the manual pages for sshd_config(8): All components of the pathname must be root-owned directories that are not writable by any other user or group. If you don't, then it doesn't work. But you are certainly notified about the problem in system log. ...



Top 50 recent answers are included