There are a few different terminal emulators for the iphone but they all seem to be subscriptions. I had tried them but it wasn't worth it to pay a monthly cost for something I was only really needing for an emergency or for fun.
Someone recommended iSH which I had used before, it's an alpine linux distro that works on the iphone as an app. From what I understand it works using syscall translations which is very cool. Last time I complained about iSH having documentation and FAQs in it's discord making it difficult to learn about. The biggest limitation was the lack of SysV semaphores as I was trying to get ScarletDME running on my phone.
Given all that, the ssh capabilities of iSH are great and I could just use iSH as a way to connect to servers. I love that it's a Linux distro so I could actually send over my dot files and get everything how I like it.
I really need to get a little mini keyboard for this.
Funnily the icon looks like a dollar sign as it mixes the i and the s. It's a free app though.