I recently bought another IBM Model M (1395660) on eBay the other day, not thinking that it is actually a terminal keyboard. I thought it has a detachable SDL cable like my current Model M (1391401). I was wrong. Turns out it has a non-removable RJ-45 plug instead, thus being a terminal keyboard. Well, aftering some researching, some were able to get it to work by using an ATMega. I was able to find a pinout of the RJ45 plug on the keyboard, and simply just wire it up to a PS/2 cable. Though apparently, the colour of wire for PS/2 is not standardized, which led to testing each pin to see what it does. I cannibalized an old Microsoft keyboard for the cable and was able to hook the wires up straight to each other.

PS/2 cable wires on a breadboard, original connector above.

 

For this specific PS/2 cable, the pinout is as follows:
IBM -> PS/2 Cable
black -> red         +5V 
red -> white         data 
yellow -> brown  clock
white -> black     ground 
 
The last wire (next to the white wire) on the breadboard is ground, which I have on the metal body of the keyboard. Thankfully everything mostly works. The "Print" key on the left hand side of the board is somehow F5 and the blank key above it is CTRL+F. Next step is a neat soldering job and it's good to go!