In The Lord of the Rings: The Fellowship of the Ring, there were many parts which mentioned that Bilbo knew Aragorn, and had known him for some time. This is after Frodo met Aragorn, fled past the Ford, and made it safely to Rivendell. In the time spent during and before Elrond's Council, many mentions were made implying that Bilbo and Aragorn were close friends.
"[...] you have disturbed me - in the middle of making up a song. I was stuck over a line or two, and was thinking about them; but now I don't suppose I shall ever get them right [...] I shall have to get my friend the Dunadan to help me."
-Bilbo to Frodo and Elrond (Many Meetings)
Suddenly Bilbo looked up. "Ah, there you are at last, Dunadan!" he cried.
"Strider!" said Frodo. "You seem to have a lot of names."
"Well, Strider is one I have never heard before, anyway," said Bilbo. "What do you call him that for?"
"They call me that in Bree," said Strider laughing, "and that is how I was introduced to him."
"And why do you call him Dunadan?" asked Frodo.
[...]
"Well, my dear fellow," said Bilbo, "[...] can't you spare me a moment? I want your help in something urgent. Elrond says this song of mine is to be finished before the end of the evening, and I am stuck. Let's go off into a corner and polish it up!"
Strider smiled. "Come then!" he said. "Let me hear it!"
-Bilbo, Frodo and Aragorn (Dunadan/Strider) in conversation (Many Meetings)
All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost.
From the ashes a fire shall be woken,
A light from the shadows shall spring;
Renewed shall be blade that was broken:
The crownless again shall be king.
[...]
"I made that up myself," he whispered to Frodo, "for the Dunadan, a long time ago when he first told me about himself."
-Bilbo to Frodo about Aragorn (The Council of Elrond)
So from these parts in the book, it is clear that Bilbo and Aragorn knew each other for a long time, Aragorn trusted Bilbo and told him his story, and they were obviously close enough that Aragorn would be willing to help Bilbo with his song, though he had other pressing matters on his mind. Even later, in The Return of the King, Bilbo was even given an invitation to Aragorn's wedding, which they both had been waiting for, for some time.
However, nowhere in the book can I find the story of how Bilbo and Aragorn met, how they became so close, without Frodo ever hearing of him from his uncle, and especially how Bilbo earned Aragorn's trust. Does anyone know the story between these two?