Yeah, a lot of guys don't realize there's a difference between using machines and not using them. Running on a treadmill is not the same as running on the ground. Lat pulldown machine is not the same as doing pull-ups. Leg press is not the same as doing squats. And so on.
I think it took me about 6 months to get from 1 pull-up to 15 pull-ups. And then a few more months to get to 20. I don't have any specific advice, except to just do them. Even though you're only able to 5 - 6, you're building up your strength gradually. And you'll be able to do more as time progresses.
If you're at the gym, ask someone to spot you. And by spotting, I don't mean holding your feet. Ask the spotter to give you a little push upwards on your back. This is the proper and safe way to provide assistance.
Using the correct form also helps. You should have a slightly arched back, so that you shift the workload to your lats. If your back is straight, then your arms are doing most of the work.
Also, do some grip and forearm exercises. When doing pull-ups, it's pretty common for your grip to give up before your arms/lats do. You can use wrists straps during pull-ups if you want, but you lose the benefit of developing grip strength.
Try doing negative reps. Pull yourself up, then in a slow and controlled manner, descend back to the starting position. Do another pull-up, and repeat.
Push-up/pull-up supersets. Do as many pull-ups as you can. Then do as many push-ups as you can. Take a minute to catch your breath. Then repeat. The number of pull-ups and push-ups will decrease with each set. You can stop when you're spent, or whenever you feel like puking.