Once you are running a linux server you can choose to do the login by username and password authentication or by certificate authentication. Personally I always choose for the latter as it is more difficult to intercept or hack in to.
Setting up certificate authentication is really simple. Just login to the machine as you would normally. Change to the user you are setting-up a certificate for and enter:
ssh-keygen -t rsa
You will be prompted for a password twice. After this is completed two files will be generated. One being the public file and one being the prive file. You need to download the private file from the server and store it somewhere safe. The public key needs to be copied to:
~/.ssh/authenticated_keys
After this you will be able to login to the server using your username and the private certificate. Please note that for Putty you will need to import the generated private key into puttygen and export it into a new private key. This is because Putty does not support the SSH generated private key.
Sometimes when you are developing you encounter the stranged errors. Today is just such a day. I’m right now having issues with memory access violations in on of the programs I’m developing.
This on its own is not that big of a deal, but I can’t seem to trace down why it’s happening. If I debug the function that causes the error has no issues. No memory violations, but when I continue running (without debugging every single call) then all of a sudden at some point in time I get a memory access violation.
Now I don’t exactly know where it’s comming from. It may have something to do with the fact that the object I’m deleting is a prototype of a prototype. And also occasionally gives me an error during compile time that I have no destructor in the class. But when I compile the files one by one it does not give this error. And the class in question does have a default destructor.
Hmm, guess it’s time for some real line by line debugging and digging into the internet about the obscure error message I got.