Mishkat al-Masabih 1423
He said:
God’s Messenger led us in the prayer in time of danger and we drew up in two rows behind him with the enemy between us and the qibla . The Prophet said, "God is most great” and we all said it; then he bowed and we all bowed; then he raised his head after bowing and we all raised ours; then he and the row next him went down in prostration while the rear row stood facing the enemy; then when the Prophet finished the prostration and the row next him stood up, the rear row went down in prostration; then they stood up; then the rear row went to the front and the front row to the rear; then the Prophet bowed and we all bowed; then he raised his head after bowing and we all raised ours; then he and the row next him which had been in the rear in the first rak'a went down in prostration while the rear row stood facing the enemy; then when the Prophet and the row next him finished the prostration the rear row went down and prostrated them selves; then the Prophet, uttered the salutation and we all did so. 

Muslim transmitted it.
وَعَن جَابر قَالَ: صَلَّى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ صَلَاةَ الْخَوْفِ فَصَفَفْنَا خَلْفَهُ صَفَّيْنِ وَالْعَدُوُّ بَيْنَنَا وَبَيْنَ الْقِبْلَةِ فَكَبَّرَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَكَبَّرْنَا جَمِيعًا ثُمَّ رَكَعَ وَرَكَعْنَا جَمِيعًا ثمَّ رفع رَأسه من الرُّكُوع ورفعنا جَمِيعًا ثُمَّ انْحَدَرَ بِالسُّجُودِ وَالصَّفُّ الَّذِي يَلِيهِ وَقَامَ الصَّفُّ الْمُؤَخَّرُ فِي نَحْرِ الْعَدُوِّ فَلَمَّا قَضَى النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ السُّجُودَ وَقَامَ الصَّفُّ الَّذِي يَلِيهِ انْحَدَرَ الصَّفُّ الْمُؤَخَّرُ بِالسُّجُودِ ثُمَّ قَامُوا ثُمَّ تَقَدَّمَ الصَّفُّ الْمُؤَخَّرُ وَتَأَخَّرَ الْمُقَدَّمُ ثُمَّ رَكَعَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَرَكَعْنَا جَمِيعًا ثُمَّ رَفَعَ رَأْسَهُ من الرُّكُوع ورفعنا جَمِيعًا ثمَّ انحدر بِالسُّجُود وَالصَّفُّ الَّذِي يَلِيهِ الَّذِي كَانَ مُؤَخَّرًا فِي الرَّكْعَةِ الْأُولَى وَقَامَ الصَّفُّ الْمُؤَخَّرُ فِي نَحْرِ الْعَدو فَلَمَّا قَضَى النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ السُّجُودَ وَالصَّفُّ الَّذِي يَلِيهِ انْحَدَرَ الصَّفُّ الْمُؤَخَّرُ بِالسُّجُودِ فَسَجَدُوا ثُمَّ سَلَّمَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَسَلَّمْنَا جَمِيعًا. رَوَاهُ مُسْلِمٌ