Are your using an authentication algorithm or are you just encrypting the message?
If you just have to encrypt the message then make sure both ends have the same cypher stored in them (Two arrays of characters should work ) and encrypt the string character by character before you send the message then decrypt it character by character on the other end.
You don't use a Caesar Cypher for authentication merely encryption. If you want authentication then separately you can have the first message of the socket connection be a username/password both of which you can encrypt client side and decrypt server side, then check they are valid. For the simplest example of this just hard code an acceptable username and password on the server and have the username and password on the client be entered on the command line.