Two Ways:

I. Through wifi
II. Through Usb multiplexing



Method I

1.Your IPhone should be jailbroken

2.Go to Cydia
3.Download OPENSSH & install it
4.Now Download & Install Putty in your PC
5.Now Open putty and under Hostname type in Your IPhone IPaddress
6.Your IPhone IPaddress can  be found at and go to wifi tab select your wifi network e.g.
7.Now click open
8.Putty will open a window connecting may take few seconds
9.login as root
10.Under password field the default password is alpine
11. The password  can be change by typing change passwd
12.That’s It you have succcessfully login Your IPhone



Method II

For SSh via Usb


1. Install OpenSSH on your iPhone via Cydia.

2.Download & Install Python 2.7 & install it on your PC.
3.Now download usbmuxd  (Available for Linux/Windows/Macs)
4.extract usbmuxd to C: drive
5.Open Command Prompt and type the command below:
6.(i)  C:\> cd usbmuxd-1.0.8
   (ii) C:\usbmuxd-1.0.8>cd python-client
   (iii)C :\usbmuxd-1.0.8\python-client>\ -t 22:22
7.Now connect Your IPhone To PC
8.Open Putty now and under hostname type :root@localhost 
9.Click open
10.That’s it now you have connect your IPhone over SSh via usb.