#SSH doesn't work on my phone on ios 14
355 messages · Page 1 of 1 (latest)
What is ssh
just google what it is
What jailbreak
And is OpenSSH installed?
12 pro max
and openssl
before it gave me a publickey error
try a userspace reboot if you haven’t and connect again maybe?
oh also
if i have a very long uptime
would that have an effect
It shouldn’t but the system can become somewhat unstable with time technically
same error after userspace reboot
A full reboot might be better if your phone’s been on for like weeks
its been on for about 133 days
has SSH ever worked in those 133 days
only wired ssh
when i plug it into my mac it works fine with ssh
second i try wireless
it refuses to connect
it could be a configuration issue? not sure
can you add -v to the ssh command to get a verbose output
just did that lmao
like before you sent your message
oh, are you trying to ssh to your pc from your phone?
yeah
no
im tryna ssh into my phone from my pc
i just tried with my other phone
with working ssh
ahhh okay nvm then
hmm
ssh -oHostKeyAlgorithms=+ssh-rsa [email protected] -v
see if this does anything
same error
yeah ssh is running in mobile
what happens if you try logging in as the mobile user instead of root?
wdym by ah
just ah as in i didn't think that would work anyway
/var/jb doesn’t sound right here to me personally for iOS 14 
Do these paths exist on the device?
Try to ls /var/jb/root/var/.ssh
I’m probably wrong
i dont see a jb folder in var
what repos do you have added
these
Make sure you’re downloading OpenSSH from Procursus
yeah i did
That’s weird.
is this normal
It should be? Looks correct to me
no, wait
that error is reading the keys from the phone
i assume your other phone is jailbroken rootless
yes
yeah
damn it
not even uninstalling openssl worked
can try an even older algorithm i guess ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 [email protected]
just double check if the ip is the same
and it hasn't changed on the phone
default key algorithm should work since iOS 14 isn’t that old
should i send over my sshd_config file
I have no clue what’s wrong there
Weirdly I had the same issue on an iPhone 5 I jailbroke with Socket recently
might as well send it
oh
how'd you fix it
or is it still broken
Still is I just used SSH over USB lol
yeah thats what i have to do rn
it's weird because the error you sent earlier implied ssh was working fine
this one
should i put pubkeyauthentication back to yes
yeah after doing that i just get permission denied
only thing i can think of is regenerating host keys via ssh-keygen -A then restarting sshd
how do i do that?
like how do i restart sshd
uhh
launchctl stop sshd
doing launchctl reboot sshd
just made my phone go black
oh thank god
thought i fucked it up
it just kernel panicked
yeah launchctl reboot reboots the device lol
o
welp there goes the 133 day uptime
you shouldn't need to
same error
Maybe start sshd in debug mode?
launchctl stop sshd
then
sshd -D
it should show debug logs and such as stuff tries to connect
says no hostkey available
this needs to be done on the ios 14 phone
no that checks out
yeah i did
oh i thought the 12 pro was the one jailbroken rootless
no my 12 pro max is
ssh-keygen should have generated host keys though
oh oops
Wait no I know the issue
do
sudo su
Then
/usr/sbin/sshd -D
it did nothing now
try connecting
nothing
same error or is sshd just not showing anything on the phone
both
wtf
to sanity check can you ssh from your pc to your rootless device
just use mobile as the user instead
yeah
man
tf is this
yeah that's normal, it happens the first time you open a terminal on jailbroken ios
oh
1 gives you all of the zsh features but if you aren't using the terminal after this you can just q
oh ok
is there any way to fix ssh on my iphone 12 pro?
idk i'm gonna ping <@&355177530061357057> because there is so little documentation on ios ssh issues it would be worth trying to figure this out
oh ok
situation: ios 14 device jailbroken with taurine, ssh refusing to connect
wow lots of people are responding
have they tried a different network
What about turning off private IP address in Wi-Fi settings
post the latest error please
it's not a network or firewall error as they can connect to a rootless device
oh
same error
do you want to use keys or do you want to use password auth
password auth
im fine with either
hm
config is here but i think PubKeyAuthentication Yes is on
it is
and when i turn it off
i get this error
if you turn that off then you have no authentication methods
does the /etc/ssh/sshd_config.d/ folder exist
i already did
no changes from that?
i think it still has pubkeyauth on no
but its on yes rn
eh just upload the current one anyways
what happens if you try sshing into mobile
can you run with -vvv
basically trying to see if the server ever offers password auth
wait did my screenshots send
id rather fix password auth
since if anyone else has this issue
there will be people able to find a solution easier
thats fair
lets do two things
- enable logging to file
- change logging level to debug
for 1. let's find out where the launch daemon plist is
how do i do that?
i assume you have a terminal app installed
yeah i have com.apple.terminal
aight
grep -rF sshd /System/Library/LaunchDaemons /Library/LaunchDaemons
it should be in one of these places
nice
so it's the one in /Library/LaunchDaemons/com.openssh.sshd.plist
open that up
in filza or terminal
tbh whatever is easier for you we're gonna edit the file
so in the program arguments list, at the end we shall add
hm
lets put it in tmp
-E
/tmp/sshd.log
-E is one item
the path is another item
add that as an item?
yea so Item 3 is -E and Item 4 is the file path
like this right?
alr
step 2 is easy
in sshd_config change the LogLevel from INFO to DEBUG
step 3 userspace reboot
then try connecting again, and after it fails, check /tmp for the log
ok
done
brb
back
a
well now its not letting me send it
says permission denied
the log file?
yeah
are you grabbing it from filza or?
what should i do
try copying it from terminal
sudo chown mobile:mobile /var/mobile/sshd.log
remove sudo if your terminal is logged in as root
wait
i have it in my notes app
lemme grab my mac rq so i can send it
@cerulean maple i got it
oh ok
do i reboot userspace after doing that
if you don't see debug3 in logs after trying to connect again, do a userspace reboot
i see debug3
also im going to the apple store in a bit
since i have to fix a seperate thing
its ok im honestly out of ideas
oh ok
maybe completely uninstall and reinstall openssh-server or something
or restore rootfs
alr
im too lazy to setup all my tweaks again
worst case just use pub key auth
oh ok
there should be a file like this but called id_rsa.pub, copy this to /var/root/.ssh/authorized_keys
for pub key auth
oh ok
theres no id_rsa in this folder
oh
you'll need to make an ssh key then
github has a tutorial for it, i've gotta go do some other work
that works
you can use the same keys or you can generate new ones
oh ok
if you use the same keys, copy id_ed25519 and id_ed25519.pub to ~/.ssh on mac
alr
root doesnt have a .ssh folder
make one
alr
you'll need to set the perms on it to 600 or something
chmod 600 /var/root/.ssh/authorized_keys should work
how do i do that?
oh ok
you can also do it with filza
r/w on owner, nothing on group and everyone
its been a while so i forgot what the filza ui looks for it honestly
both folders?
or just authorized_keys
maybe r/w/x (700) on the .ssh folder itself
i added the public keys but its still not working
still pubkey denied?
yeah
yeah thats exactly what im doing
ohhhh
inside is the contents of id_ed25519.pub
its basically a list of all the (public) keys allowed to ssh
do i restart sshd now?
shouldnt need to
id_ed25519 exists in c:/users/something/.ssh?
yes
'
yeah
Authentication refused: bad ownership or modes for file /private/var/root/.ssh/authorized_keys
debug3: Ignored authorized keys: bad ownership or modes for file /private/var/root/.ssh/authorized_keys
d```

can you check in terminal?
ls -lsall /private/var/root/.ssh/authorized_keys
or click back here and take a screenshot
i changed it to root and root and it started working
technically supposed to be wheel, but also works

