"Permission denied" when trying to SSH my iPhone though password is correct

Hi,

I hope this is the correct section in the forum to post as I'm trying to SSH from my MacBook.
I was looking to see whether ssh on my jailbroken iPhone 6s (10.3.1) still works fine and was following this old reddit guide. I installed OpenSSH&OpenSSL from Cydia and changed the password using MTerminal successfully. I did check whether the password is correct through the command "su" and it did work.

When trying to SSH from my OSX's Terminal I get the following error message after each of the 3 attempts it gives me.

Permission denied (publickey,password,keyboard-interactive)

I did a couple google searches and deleted the known hosts file from my OSX. That did not work out. So then I set the root password back to "alpine" not via Terminal, but by modifying /etc/master.passwd . Then successfully checked whether it worked via MTerminal. Still on my Mac it gives me the same Permission denied error.

I also tried ssh my phone without success after connecting both devices to another WiFi.

This is the command I enter when trying to ssh my iPhone by the way: "ssh root@192.168.178.55"
Would the output that comes when using ssh -v be helpful and safe to post publicly?

Thanks in advance!

Hi,

It is more likely that direct root login is not allowed, this is usually set in the /etc/ssh/sshd_config file. Can you ssh in as an other user?

Regards

Gull04

Thanks for answering!
As what other user could I ssh in? I did find the sshd_config file. Do I need to do anything with it?

Hi,

There should be a line that says "PermitRootLogin No", you have to change that to "PermitRootLogin Yes" - then restart ssh.

Regards

Gull04

It already says "#PermitRootLogin yes" in the sshd_config file.

The leading # makes the line a comment and therefore ignored. Try removing the leading # and then restart and see if that works.

I hope that this helps,
Robin

Thanks rbatte1 and gull04. Worked!

Hi Hss1,

Not a problem, remember to look by once in a while - now you'll be able to help someone else out with an ssh problem.:slight_smile:

Regards

Gull04