« first day (1844 days earlier)      last day (3184 days later) » 

11:00 PM
whe you listed the folder, you saw something like "drwxr-xr-x"
those are permissions
 
wait ...
for 700
I don't need to file name ?
just it ? chmod 700 .ssh
?
 
no, that second command was for the directory
 
ah ok
 
drwxr-xr-x
 
done
 
11:01 PM
this thing would translate to 755
first symbol tells you whether it is a directory
and then there are groups of 3 symbols
 
ah ok
so ?
 
do you understand?
 
!!!!!!!!!!!
yes !
I feel like a police :)
 
so, 600 means "only owner (sajad) can read or write this file"
 
ah
my .ssh file is this now: drwx-----
 
11:05 PM
ok, now open a different putty window
 
ok
 
@Sajad it's a directory. And for you to be able to open a directory it needs the X bit
 
done
 
now, start by clicking on "SSH" in that sidebar tree of putty
and then "Auth"
found it?
 
I did not get this :
now, start by clicking on "SSH" in that sidebar tree of putty
 
11:08 PM
 
Now I have two putty window that are connect to the server
I close one of them ?
 
yes
 
ok
 
open it again, but don't log in
 
ah ok
 
11:09 PM
instead go to the part in the picture
 
I browse that file ?
 
freebsd-vm.ppk file
 
@tereško I did
 
ok
 
I press "open" ?
 
11:10 PM
no
and then you go back to "session", write in "sajad@localhost" and press "save" .. and then "open"
 
where is "session" ?
 
at the top
 
ah ok
I did
 
if you did all this correctly, it will be asking you for password (the one that you wrote when crating a key in puttygen)
 
passphrase for key "sajad@laptop":
 
11:12 PM
yes, the one from putty gen
 
very good !!!!
worked correctly !
 
so, this is called "two factor authentication"
 
Now I can be connect in the server with two password
 
to log in as "sajad" you need to own a key and you need to know the passphrase
 
which one is owner ?
 
11:14 PM
@Sajad what do you mean?
 
@tereško for login as "sajad", is what ?
"sajad" is limited user ?
 
no
 
look
I have two password for connectiong to server
right ?
 
no
 
:)
I have !
one from putty key generator
 
11:16 PM
ok, lets complete the process, and then I will answer your questions
 
one from the main password
@tereško ok
 
so, close the putty window where you logged in as root
 
as root is the first putty ?
how can I undrestand I'm as root or as sajad ?
 
teresko@sigillum:~/.ssh %
this is what I see in my terminal , it tells me that I am user "teresko" on server "sigillum" and in directory "~/.ssh"
 
whoami ;p
your prompt can be customised.
 
11:18 PM
sajad@sajad:~ is what I see in the terminal
 
in both putty terminals?
 
@tereško I see
@tereško Yes !
there is no root !
 
well, then close one of them
 
ok
 
now, write: su
it will ask you for root password
 
11:19 PM
no
 
?
 
password:
su: Sorry
 
did you write the root password?
 
@allquixotic java based tho?
I seem to recall its one server, many remote systems tho, which is nice
 
@tereško ok done
root@sajad:/home/sajad #
 
11:21 PM
waht was the problem? what did you do wrong?
 
@tereško: next time you walk someone through... er... everything at all, you might want to consider creating a new room ;p
4
 
@tereško 'us' instead of 'su'
 
@JourneymanGeek true, but this room has been dead for many hours
 
@tereško: cause people are too polite to interrupt ;p
 
@Sajad , ok, now you need to go back to sshd_config file and disable the root login again.
 
11:22 PM
when I wrote 'us', it told me "command not found", and then I wrote "su" and press enter two time, never mind !
@tereško where is sshd_config ?
 
in /etc/ssh/ directory
 
@tereško I can not find that
 
PermitRootLogin, I think
or AlloweRootLogin
40+ line
 
what I write now ?
 
you should change it to "no"
 
11:26 PM
root@sajad:~ #
@tereško I know, how can I open it ?
I forgot
 
with "ee"
 
ee /etc/ssh/ directory ?
 
you need the filename too
 
@tereško what is file name ?
sshd_config
ok
 
yes
 
11:27 PM
ee /etc/ssh/ sshd_config ?
 
without the space
 
ow! so sensitive !
I set "yes" to "now" and put a # on the back of it ?
 
"no"
you can leave out the #
the # is for commenting out a line
 
just change 'yes' to 'no', right ?
 
aha
 
11:29 PM
@tereško ah ok
 
and then restart the sshd service
 
restart sshd service ?
 
no
 
I forgot that code .. how restart it ?
 
press arrow up several times
 
11:31 PM
ow! but I closed that putty window (that I restarted one time)
 
try anyway
 
ok
service sshd restart ?
 
yes
 
done
all thing is fine ? and done ?
 
ok, the "security part" is complete
 
11:33 PM
very good !
Do I close putty key Generator ?
 
now only way to remotely log in is using "sajad" user if you have the key and know the passphrase
yes, you can close the generator
questions?
 
ok, one short question
root@sajad is owner or sajad@sajad ?
which one is better ?
Stronger
unlimited
 
root user has full access to everything
 
aha, I got it !
 
is the "administrator"
 
11:36 PM
@tereško I got it !
 
thing is, "root" user exists on all linux & bsd systems
 
@tereško ah
 
if I want to hack your VPS, that will be user I try to break in
my VPS get bombarded by root login attempts from chine all the time
 
ah ! I see
 
but since root login is disables in ssh config, they can try till the end of time
 
11:38 PM
@tereško yes I undrestand it
 
and the "simple user" account requires an RSA key to log in
and the hackers don't have that
 
@tereško RSA key is: that big text ?
 
well, yes and no
you have two keys: private and public
private key is that *.ppk file
public key is what you put in the authorized_keys file
if you want someone to give you access, you send them your public key
 
I see !
 
remember, I posted a link from wikipedia and told you to read it later ..
 
11:40 PM
@tereško ok I will
 
ok
 
ok well, you need to sleep now, right ?
 
soon
lets actually install something on that box
 
@tereško ok ... very well
what thing ?
 
php5.6
 
11:41 PM
oh wait
I can open my server by browser ?
there is a IP for my server ? or domain ? :)
 
currently only public service that it is runnig is SSH
you need to install webserver for opening something in a web browser
 
ah
webserver is like Cpanel ?
 
no, like apache or nginx
 
ah !!!!
ok
well, how can I install php5.6 ?
 
to install packages on freebsd you sue "pkg" (some of the commands are here: wiki.freebsd.org/PkgPrimer)
first you need to find a name of the package: pkg search php
(there will be a alot)
 
11:46 PM
I write this pkg search php in the terminal ?
 
yes
(when you run it first time, it will want to download a lost of packages)
 
the package management tool is not yet installed on your system
do you want to fetch and install it now ?
[y/n]:
 
you do want to
 
please wait ...
it is downloading now ?
 
yes
 
11:47 PM
ok
 
it is downloading a list of all available packages and their dependencies
 
alright ...
 
basically, it's collecting information about what you can install
did you get the big list or is it still downloading?
 
no
wait
@tereško still should I wait ?
 
hmm .. something is different
wait a little bit more
 
11:52 PM
oh !!
 
?
 
big list shown
 
ok
 
there is all version of php
 
now try: pkg search php56
that will give you only the list relevant to php 5.6
 
11:53 PM
ah
 
without the dot
 
ok
 
see the stuff ?
good
 
unknown command : php56
 
1 min ago, by tereško
now try: pkg search php56
 
11:55 PM
:)
 
ok, done
 
you have an attention span of a goldfish
 
@tereško :)
ok, I'm seeing the result
 
ok, now, to install stuff, the command is: pkg install <name>
try : pkg install php56
 
ok
 
11:56 PM
it will install just php, without extensions
 
ah
php has extensions ?
proceed with this action? [y/n] ?
 
yes, sessions are an extension, pdo is an extension
 
@tereško oh ! I need them
 
you will install them later
 
there is not a package fully ?
10 %
20 %
40 %
ow it is so fast
50 %
90 %
 
11:59 PM
error ;p
 
@AnmolRaghuvanshi no
 

« first day (1844 days earlier)      last day (3184 days later) »