Linux – vi (editing files)

Using vi you can edit any file you want Let’s see how this works, type vi and the file name.

If you need to type some content inside this txt document, press i (insert)

And now you can type anything you want.

If you need to add a new line, just put […]

How to fix an incorrect key in ssh known_hosts

Sometimes you have to reimage or reinstall a server while keeping its current IP, if that’s the case when you try to connect again with ssh this error will appear:

Use this command to remove automaticly your entries from known_hosts:

If you don’t need to take a look the known_hosts.old, you just need […]

Linux – user management commands

How to create a user:

Set password:

If your password is too simple, it shows:

But it’s not nesessary change the password if you don’t want to, just type the same and it will be accepted.

In case you need to change the password or add a password for a user […]