Hello I've made some research about the SSH security on jailbroken iPhones. But the only info I found was about changing the root password. Well IMO it's not enough since it's possible to bruteforce it. Now I'm asking you if it's possible to close ports, or at least change the SSH port? Also is there any way to limit connection attempts for SSH? Also any tips for further security is appreciated. I have average knowledge about Linux but am new to iPhone.
It is running OpenSSH to provide the SSH server access, so you can log into the device and edit the SSH configuration file to run on a non-standard port just like you would on a Linux machine, then just restart the phone or toggle SSH. Secondarily, install SBSettings and it will allow you to toggle the SSH server itself and enable or disable it at any given time. Most users disable SSH until they are connecting. This is inherently more safe than changing ports or refusing users who fail to authenticate multiple times.
Originally Posted by Antarktikali
As far as limiting connection attempts, I'm not certain. I know that utilities such as fail2ban will do so on linux machines, but I'm not certain of an iPhone equivalent.
What I would recommend instead is firstly changing the password. Then setting up public/private key pair authentication Quick Logins with ssh Client Keys
once you know this works, disable password authentication for SSH.
This is not a complete solution but it does prvent password sniffing, brute force attacks on the password and shifts the security focus to your desktop machine (or wherever you have stored the other half of the key pair)