|
So I've been learning about networking, protocols, etc for a bit now and have been really interested in learning about SSH. Anyway, I was messing around with it on my iPhone and have a few questions. Basically you need a jailbroken iPhone, download OpenSSH from Cydia and then I connected via SSH with PuTTy on my Windows machine. Obviously, when I did this I was on the same network (both phone and PC). So when I entered my internal IP address that my iPhone had, I was able to SSH into my phone no problem. Now, would I be able to SSH into my phone say if I was on a different network? If my phone was at my house with the same internal IP address and I was down the road at a friend's house with a capable machine with an SSH client, could I connect to my phone? How would the client know my phone IP if I am just using the internal IP or would I use an external(?) IP address? Not sure how that works and sorts it self out really. Or would I have to do some more configuring? Also, what kind of things can you do with an SSH connection into your iPhone's file system?
|
# ? Jun 6, 2014 02:26 |
|
|
# ? Apr 18, 2024 14:06 |
|
The answer is port forwarding. At your friends house you would ssh into your homes external IP, specifying the port which ssh is running on. You need to setup port forwarding/NAT on your home router which tells it that when you connect to the routers external IP on a specific port to forward that connection to a specific internal IP and port.
|
# ? Jun 6, 2014 03:11 |
|
greatant posted:The answer is port forwarding. Bingo. Awesome. I had a suspicion that was it.
|
# ? Jun 6, 2014 03:55 |
|
ConfusedNudeMan posted:Also, what kind of things can you do with an SSH connection into your iPhone's file system? This is a pretty open ended question because after you SSH into a jailbroken iPhone you can do anything on the file system you wish. Some examples that come to mind are putting on custom ringtones, and using SSH as a ghetto form of tethering.
|
# ? Jun 6, 2014 04:24 |
|
Knowing almost nothing about iOS, I have to ask: could you scp files over to your phone?
|
# ? Jun 6, 2014 04:31 |
|
wilfredmerriweathr posted:Knowing almost nothing about iOS, I have to ask: could you scp files over to your phone? Should be able to. SCP/SFTP always worked for me without installing anything else but OpenSSH-server. Also wouldn't you already have FTP access if you've jailbroken your iOS?
|
# ? Jun 6, 2014 13:59 |
|
Make sure you change your root password if you haven't already.
|
# ? Jun 6, 2014 14:47 |
|
100 HOGS AGREE posted:Make sure you change your root password if you haven't already. haha is it still root/alpine? Haven't used an iOS device since my 4th gen iPod
|
# ? Jun 6, 2014 16:00 |
|
greatant posted:The answer is port forwarding. Follow up question to this. Say I was running multiple devices/machines on my home network with SSH enabled and I wanted to SSH into one of them from an outside client. Would you configure each device on a different port for SSH? SSH is default port 22. So if my iPhone had SSH and PC had SSH enabled, how would the NAT differentiate each device if you are only specifying a port number through your external IP connection? My guess is using a different port for SSH on each device, but can you do that?
|
# ? Jun 8, 2014 04:53 |
|
ConfusedNudeMan posted:Follow up question to this. Say I was running multiple devices/machines on my home network with SSH enabled and I wanted to SSH into one of them from an outside client. Would you configure each device on a different port for SSH? SSH is default port 22. So if my iPhone had SSH and PC had SSH enabled, how would the NAT differentiate each device if you are only specifying a port number through your external IP connection? My guess is using a different port for SSH on each device, but can you do that? Yes. Set your iPhone/PC SSH server port to different numbers, lets say 2222 for your iPhone and 2223 for your pc, and then when you forward your ports, forward 2222 to your iPhone's IP, 2223 to your PC's IP. e: V that's awesome, didn't know you could do it like that nescience fucked around with this message at 22:06 on Jun 8, 2014 |
# ? Jun 8, 2014 09:46 |
|
You shouldn't need to do that. Almost all routers (even lovely Soho ones) will let you specify a unique outside port. Ie. 123.123.123.123:2222 -> 192.168.1.10:22 123.123.123.123:2223 -> 192.168.1.11:22
|
# ? Jun 8, 2014 15:08 |
|
|
# ? Apr 18, 2024 14:06 |
|
Installing openSSH on your jailbroken idevice will enable scp/sftp. The root password is still alpine, and yes, you should change it posthaste. Most common uses for it include backing up settings files, or editing some setting configure files, especially LockBackground.html, or transferring over icon files. There's a couple of good icon packs/themes out there that don't make it to a main repo or even a less popular one. Or AppYouNeed.ipa doesn't have an icon in the theme you really like, so you make one and put it on yourself. These are all things that can pretty much be done on your phone in iFile, but maybe you don't like touchscreen file browsing and want a commander style layout or whatever.
|
# ? Jul 6, 2014 07:02 |