A homeless County Durham man who threatened to stab his victim outside a busy railway station has been praised for trying to get his life back on track.