Let S have determinant d, and conjugate SG/S. If d is a square then scale S by 1/sqrt(d) to find a matrix of determinant 1 that realizes the same automorphism. Half of the conjugal automorphisms are actually inner automorphisms.
If d is not a square, then suppose ZG/Z realizes the same automorphism, for some Z in G. Let Y be the inverse of Z and multiply by Y on the left and Z on the right. Thus YSG/S/Y = G. YS induces the trivial automorphism, hence YS = J, where J is an invertible matrix that commutes with all of G. Thus J is constant diagonal, and its entry, squared, gives det(J). Take determinants, and det(Y)det(S) = det(J). Thus 1 times a nonsquare equals a square. This is a contradiction, hence the conjugal automorphisms double the inner automorphisms of G. These are all the possible automorphisms of G, as I will prove below.
Every automorphism of G induces an automorphism on G/C; just mod out by the center. The converse may not be true. There might be an automorphism on G/C, i.e. the cosets of C, that does not extend to G. So let's consider both G and G/C as we plow ahead.
As shown in the previous section, φ can be adjusted so that it fixes J. That means it fixes S, and with one more conjugation, all diagonal matrices are scaled by 1 or -1. This is determined by the base diagonal matrix B = [e,0|0,f], where e is primitive mod p. Either φ fixes N, or it negates those matrices with nonsquares on the diagonal.
If two matrices of order p commute, and they are not part of the same cycle, then they build a subgroup of order p2. This is impossible, hence two order p matrices belong to the same cycle iff they commute.
Let [a,b|c,d] be a matrix of order p, and conjugate this by B, giving another matrix of order p: [a,be2|cf2,d]. Do they commute? The upper left entry implies a2+bce2 = a2+bcf2. Assume p > 5, so that e2 ≠ f2. Thus b or c is 0. The matrix is triangular. The eigen values are 1, and these become the diagonal entries. Only the standard cycle, or its transpose, is mapped onto itself when conjugated by B. All other p cycles move under conjugation by B.
In the case of G/C, the matrices might anticommute. Let M be the presupposed matrix of order p, and write MBM/B = -BM/B*M. Thus BM/B, conjugated by M, yields -BM/B. The trace has gone from 2 to -2, or vice versa, and the eigen values have changed. This is impossible. Therefore the above results hold in G or in G/C.
Let U be the transpose of J, the standard upper triangular matrix, and let V = φ(U). Note that BU/B belongs to the same cycle as U. Apply φ, and BV/B belongs to the same cycle as V. Since V cannot be lower triangular, as these matrices are already spoken for, V is upper triangular. In other words, V is some power of U.
Let V = Ul, that is to say, [1,l,0,1]. Note that J inverse times U has order 6 in G, and order 3 in G/C. Apply φ, and the cube of the result is -1, or perhaps 1 in G/C. Here are the resulting equations.
l2 - 3l + 1 = -1
l3 -4l2 + 3l = 0
-l2 +4l -3 = 0
-l3 + 5l2 -6l + 1 = -1
The only solution is l = 1, unless you are working in G/C, and the cube of the matrix is 1, whence l = 3. So φ(U) = U, or perhaps U3 in G/C.
Let A be the antidiagonal matrix [0,1|-1,0]. A has order 4 in G, and order 2 in G/C. Thus the image of A has order 4 in G, and order 2 in G/C. The only square roots of 1 are 1 and -1, so even in G/C, the image of A, when squared, has to be -1. The image cannot be [i,0|0,-i], as this is already the image of a diagonal matrix. So the trace must be 0, as in [a,b|c,-a]. Note that (BA)2 also equals -1. Apply φ, and (B[a,b|c,-a])2 = -1. The trace becomes a(e-f), and if this is 0, then a = 0. The image is antidiagonal. Call it [0,x|-y,0]. Apply B, and every antidiagonal matrix has its upper right entry multiplied by x, and its lower left entry multiplied by y; and possibly negated if the entries are nonsquares.
Run AJ/A through φ, and show that U is raised to the x2. Thus x2 is 1 or 3.
Restrict attention to G, and multiply some power of J by some power of U. The resulting matrix can have anything you like in the upper right and the lower left. The lower right makes the determinant 1. Thus every matrix with 1 in the upper left is fixed by φ.
Multiply a power of U by a power of J, and every matrix with 1 in the lower right is fixed.
Multiply by B on the left or the right, and φ negates a matrix iff the upper left, or lower right entry, is a nonsquare. There are of course matrices with a square in the upper left and a nonsquare in the lower right, so we have reached a contradiction. Nonsquare diagonal matrices cannot be negated by φ, and φ fixes G. All the automorphisms of G are realized by conjugation.
Return to G/C, and assume φ(U) = U3. Note that AJ = J-1U. Push this through φ and [x,x|-y,0] = ±[1,x2|-1,1-x2]. The top row tells us x is 1 or -1; yet x2 = 3. This is a contradiction, hence U maps to U.
Since x is 1 or -1, φ(A) = A. Use gaussian elimination and back substitution to write any matrix in G as a product of elementary matrices. These are all fixed, hence G/C is fixed. Once again all the automorphisms are conjugal.
Let M2 equal the block diagonal matrix with U2 in the upper left and 1 in the lower right, where U generates O2. Assume p is at least 7, so that U2 is not 1 or -1. Multiply by M inverse (or M transpose) on the right. The bottom row now tells us M1,3 = M3,1, and M2,3 = M3,2.
Write M as [a,b,g|d,e,h|g,h,i]. Dot the botom two rows, and the rightmost two columns, and derive dg = bg. If g is nonzero then M is symmetric. A symmetric matrix squared is symmetric, but U2 is not symmetric. Therefore g = 0.
Dot the first and third rows and conclude bh = 0. If h is nonzero then b is 0. Similarly, d = 0. This brings us back to a symmetric matrix, which is imposssible. Therefore h = 0.
M now lives inthe the dihedral group that is O2± in the upper left, and ±1 in the lower right.
Let M = φ([U,1]). We showed above that M lives in the same dihedral group as [U,1]. Also, M has the same order as U. Therefore M fixes U, or spins it around 180 degrees. In other words, φ([U,1]) = [U,1] or [-U,1]. The former is simply the trivial automorphism, so assume the latter.
The same reasoning holds for [1,U]. It must map to [1,-U].
If U = [a,b|-b,a], multiply these two matrices together ant get a bottom row of [0,-b,a]. Multiply their images together and get a bottom row of [0,b,-a]. The product is in O′, and must remain gixed. Yet the bottom row is negated. This is a contradiction, hence the automorphism is trivial, and the kernel is trivial. The automorphisms of O embed in the automorphisms of O′.
Remember that O′ is isomorphic to G/C, and the automorphisms on this group are conjugal, as described above. Push this through the quaternions, and back to O, and all the automorphisms of O′ are conjugal as well. Of course we may be conjugating by something outside of O, just as G was conjugated by something with a nonsquare determinant. The corresponding matrix is orthogonal, where each row has the same length. This conjugates O onto O, and does the trick.