0

Other posts have talked about using /etc/ssh/sshd_config to change the authorization settings.

What Authorization settings should I set my sshd_config be on if I want this password to connect?

  jacobs-mbp:~ nuevo$ ssh  username@141.158.1.6          
  The authenticity of host '141.158.1.6 (142.158.1.6)' can't be established.       
  RSA key fingerprint is b1:0b:cn:o7:6b:f1:22:c5:x5:d1:f8:d2:63:d8:b2:2l.  
  Are you sure you want to continue connecting (yes/no)? yes  
  Warning: Permanently added '141.158.1.6' (RSA) to the list of known hosts.  
  Password:  
  Password:  
  Password:  
  Permission denied (publickey,keyboard-interactive).  

http://www.faqs.org/docs/securing/chap15sec122.html

1 Answers1

1

Here are the steps to change it:

su
Password:
cd /private/etc
vi sshd_config

Now type this to search for PasswordAuthentication:

/PasswordAuth    <Enter>

Now press h a few times to move to the very left of the line and you are on the #

Now press x to delete the #

Now type the following to write and quit:

:wq  <Enter>

If you get stuck or lost at any point in the editor, type the following to quit without saving

:q!    <Enter>
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • the second I press `x` I get `W10: Warning: Changing a readonly file E325: ATTENTION Press ENTER or type command to continue` then when i `:wq` it returns `E45: 'readonly' option is set (add ! to override)` – Jacob Silverman Aug 28 '14 at 08:50
  • Try using this to save and quit `:wq! ` – Mark Setchell Aug 28 '14 at 08:52
  • `"sshd_config" E212: Can't open file for writing Press ENTER or type command to continue` is vi similar to emacs and nano? – Jacob Silverman Aug 28 '14 at 08:56
  • Did you do the `su` at the start in order to become root? – Mark Setchell Aug 28 '14 at 08:57
  • yahh it returned `su: Sorry` – Jacob Silverman Aug 28 '14 at 09:18
  • That means you got the password wrong... you'll have to try again. – Mark Setchell Aug 28 '14 at 09:19
  • when I use `sudo` commands my password works but with `su`it should work but doesn't. – Jacob Silverman Aug 28 '14 at 09:22
  • Oh, ok. Just use `sudo sh` to become root. – Mark Setchell Aug 28 '14 at 09:27
  • Ok, I have successfully removed the `#` but I still can not `ssh username@host` because of the original problem still. Instead of removing the `#` do you think edited the `no` to `yes` can simply be the solution to the problem? – Jacob Silverman Aug 28 '14 at 18:22
  • You probably need to restart the `sshd`. If you don;t know how to do that with `launchctl`, I would just reboot so that the new `sshd_config` gets read. – Mark Setchell Aug 28 '14 at 21:20
  • In order to remotely access my friends computer using `ssh username@ip` and being able to have his password connect is to delete that one `#`? – Jacob Silverman Aug 29 '14 at 05:58
  • Basically you need a line with `PasswordAuthentication yes` to be in your config file `without a hash (#) in front of it` for password authentication to be permitted. – Mark Setchell Aug 29 '14 at 11:06
  • I can no longer experiment with these changes. My computer cant turn on anymore. I get directed to the ? folder blinking. Already tried repairing nothing is able to work. Going to the apple store fml. If you got any suggestions of how to fix my problem in the terminal please let me know – Jacob Silverman Aug 30 '14 at 03:44
  • You could try starting in Safe Mode http://support.apple.com/kb/HT1564?viewlocale=en_US&locale=en_US – Mark Setchell Aug 30 '14 at 07:33
  • It is funny because I got a new computer and i can easily ssh username@IP to gain remote access but it will not work with my old computer. Also I went to apple and they had to replace the cable connected to the hard drive. – Jacob Silverman Sep 11 '14 at 20:01