Install BSD & SSH
The BSD subsystem is now installed as part of the jailbreak.
Please use Cydia to install OpenSSH (Cydia -> Sections -> Networking -> OpenSSH.)

If you have a WiFi connection, you should be able to access the phone via ssh from Terminal.app with: ssh root@   (click to copy)
(this command may take a while - I'd give up after a minute or so)

(If there is no IP address in the command, or it doesn't work, then you need to find it yourself;
Go to Settings->WiFi and tap on the blue arrow next to your WiFi network.
'IP Address' is the address you are looking for.)

The default password is alpine.
For security, you should change it. You can do that with the 'Change SSH Password' function.

If you get the following message in Terminal:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ ...
then, if the IP address above is correct, you can click HERE to fix that (or do it manually.)
iFuntastic will remove the line for from the file ~/.ssh/known_hosts.
Then try again.

Read the info for the 'Change SSH Password' function to learn how to keep ssh from asking for your password every time.