You can go very close to them, say 100 meters. In the inshore channel they will not be going fast. Outside they will alter speed to get to their next port of call on time, so their speed varies.
They will normally be in the middle of the marked channel on their side of the channel, so that gives you basically three places to be: on either edge of the channel or right in the middle.
In the middle is safest in traffic separation channels where there is a buffer between the lanes. The next best place is on the starboard side of the channel. But i never go outside the channel in a strange port. It may be shallow or obstructed.
You are a boat so you can be counted like any boat larger than you. But remember the rule
book and brush up on it.
Remember the ships coming in and out of port will have a pilot and they know their stuff, as do ships crews. They will be watching for you.
Listen in on VHF
16 and 13 because the ship will often put out an All Ships message before they move on VHF
You can get quite close to them, you are not going to be sucked up some vortex.
With your AIS you will find it much easier and you will have their exact distance off. They are wonderful bits of kit. And he will be watching you on his AIS. Thats why they are great!