Hi I change my password last night on the vps, and I'm still getting hacked.
So you say you already changed your password, but after that the attackers were still able to access the system using your account? Then you have to assume that the attackers have root access (as they can see your new password), which means you have to assume they have copies of all the data on this machine. You should also assume that they have completely penetrated this installation.
they succeeded I guess do you know how to disable pts.
You don't know what /dev/pts/... is? I'm not sure you should be administering a FreeBSD system that is being attacked in that case.
PTS are virtual terminals that get created when people log in via (for example) ssh. You don't disable PTS, you disable ssh.
Make key and upload it and change my passwords. or
change my password and then upload my key?
None of the above. I would do two things: (a) make copies of any data on this system that you want to keep. (b) Nuke it, and install a new system.
had to delete his folder by hand. Something else to but I forgot what that was
So you also suspect that hackers have become root on this system, and then all you do is delete a folder by hand? And then you forget what you did?
Sorry, once a system has been penetrated, you completely get rid of it. At this point, nothing on the system is trustworthy. On your friend's laptop, you should reformat the disk, and reinstall from scratch too.
I used to think changing ports made ssh all better until I got to linode. Welcome to defensive computing.
Linode has a reputation for attracting a lot of bad hackers, and other criminal elemants. That's because they are an inexpensive and only minimally supervised hosting provider. My advice would be: After nuking this system, set up a new one somewhere else.
Get the attacker IP try and hit back with massive coordinated packet flood.
Fun, but waste of time. Your attacks will be ignored. Simply accept as a fact of life that hackers exist, more in some places than in others. Punishing them after the fact is pointless.
I never heard of locking account how to and what "necessary files"?
If you don't know how to manage accounts on a BSD system, you should not be administering one that is under attack. I would start by reading a good book about Unix in general, and FreeBSD in particular.