Tuesday, August 29, 2017

CentOS: Adding User

Command:

# useradd USERNAME
# passwd USERNAME


Result:

Changing password for user USERNAME.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.


Command:

# su USERNAME
$ cd ~
$ ls
$ pwd


Result:

/home/USERNAME

SSH: Accessing Virtual Private Server Using RSA Private Key File

Command:

$ cat vps.key


Result:

-----BEGIN RSA PRIVATE KEY-----
fasdfsadfsadJAyxNgvFkJoMF+MEyWV4Qfasdfasd
gTf2LsM2mo6Jodh+VVffsadfsadfsdafsadfa0QPTlY+905/z3e24DYtKHbP
eRfem0kq/H17eguWk4BounPWfJKrYGR1rS00K5OeWfoTAoz6osc3rN8LXwIBIwKB
gQCZXb8ppDdM50Ki7A04CSoEb/qWChMJtIRFGfMI3A+MvFuj/50Wi7zGoQz9wDxW
gv0cNaT/Z/B1z40AAAAAAAAAAAAAAAAAAAAIY83RKh/Kj+Jv8OhW1FNUp/Il7WOs
1zo+owYp9uyT08gE1XBGvMrdam2w77YabIT20Dt2jkKs2wJBfasdfVu88cqmJ2P
F0+JlFbOL5pvldjfkeDkefIesdIdfeIdkXxK343/45uo35lYVj6vXfdsafFeMWD
jHH3EYMCQQD1JcnOz8CGMSeMbFXrdb1erkt3fgcJwny4WotUUoRx5KZinPGSasXv
GmL8zshzHcN9wWFgicXGOcqpQijM8kP1AkAdHoMd4MtnOBFxF6rkhMB+8v4gR0zw
F901P7OURpHAiCf/4lnFD98fadsfsadfasdfasdfuoUFHeHqr/LLMi3jAkBUDPS7
73U1Uq55SbcO5ooR1Vuz8LH0t7W7jMIOSC1o4K4TLn6123cQJk3TBRGGjdygJQtx
jlJv2UzMUTKPaQFbAkAuvRDkvUVb1lvuduolUZHmz3SBdwiKIVMn8+SeXoCT+hL8
SQJ56ary8w+dkfjaldkfkjdekelsldkelf

-----END RSA PRIVATE KEY-----


Command:

$ cat ~/.ssh/config


Result:

Host vps
HostName 111.111.11.111
Port 22
User root
IdentityFile ~/vps.key


Command:

$ chmod 600 ~/vps.key


Command:

$ ssh vps


Result:

[root@v111-111-11-111 ~]#

Charlie Lee: Crypto Hedge: Live Conference With Litecoin Creator Charlie Lee!