Here as you can see (in the image below) there are two objects in my scene. One is asteroid and another is camera.

Now select the camera and open hypershade window.

Now select noise texture from 2d texture in the hypershade and with middle mouse button and drag it to the camera translate channel in attribute editor.

After applying noise texture in cameras translate node. Camera change its position and you will not able to move camera manually. Don't worry it because now camera translation node is controlled by noise texture. Later on we will see how can we move camera if we want to move it manually,

Now lets start to animate camera shake.......

Select the noise texture which is applied to the camera and open attribute editor.
Change parameters of noise according

Now we will start to animate noise parameters

Go to frame 60. Now asteroid should near to the camera.

Set key for "Time" and "Frequency" parameters

Go to frame 70 and set key for "Implode"

Now go to frame 80. Asteroid should go out to the camera view.

Change the value for
Time: 1
Frequency: 100
Implode: 1

And set key for all three parameters

Note: For more shake you can use high value of these parameters or you can use fractal instead.