I am 100% sure it works. My friends have connected to me many times and it is the exact same way you said.
connect ip IP
Well, then i guess you have the anwsers. But to make sure i will give you an example (connect 220.127.116.115:28960) :28960 this part is the port. If you connect to someone it always stays the same (28960)