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

22:00
@tereško yes ! ok
now, in the rules window you need to add new rule
name it .. dunno ... "ssh", protocol: tcp, host port: 22, guest port: 22
I can not write a name, It is deavtivate
did you click the green "+" button?
no yet :-)
Adapter type ?
Ok done !
so
what ?
22:03
name ?
49 secs ago, by Sajad
Adapter type ?
@tereško nothing
there is no "adapter type" in that window
there are name, protocol, ports and IPs
any way I leave it on default
don't touch that
22:05
@tereško ok
name ?
I change "Rule 1" ?
4 mins ago, by tereško
name it .. dunno ... "ssh", protocol: tcp, host port: 22, guest port: 22
ok
done?
host IP and guest IP ?
leave them empty
22:07
ok
done
now open putty and try connecting to: root@localhost
I save it, so and start ?
yes, you need to start the VM
(I actually didn't tell you to turn it off)
@tereško ok!
1 sec ...
ok
putty wants a password
well, you are trying to log in as root
22:10
ok
access denied !
password for root@sajad:
is the same with that password for login in VM ?
you are using putty to connect to the same system
ah
but I don't know why It says my password is wrong
because you make a mistake
1 sec
I think I actually know why
why ?
because it is protected by default
22:14
em, what's that mean ?
which is really good, but we need to temporary change that
how ?
ok, switch to your VM window
ok
so ?
and type in: ee /etc/ssh/sshd_config
that will open a file and let you edit it
"ee" is "easy edit" .. or something like that
22:15
@tereško where I type it ?
in the black console
(you have to be logged in as root)
aha
ok
did the file open?
oh !
yes
go to about 40-ish line, there will be text: #PermitRootLogin: no
22:17
there is 148 lines of text
ok
you need to remove the # and change that one to "yes"
then press Esc key > leave editor > save changes
# Logging
to
Loggin
?
1 min ago, by tereško
go to about 40-ish line, there will be text: #PermitRootLogin: no
ah, I found it
I just remove # or set yes instead of no ?
22:19
@tereško set yes ?
2 mins ago, by tereško
you need to remove the # and change that one to "yes"
please pay attention
really I don't know why sometimes I don't see some of your comments !!
I pressed ESC
a) leave editor
b) help
c) file operations
... ?
a ?
2 mins ago, by tereško
then press Esc key > leave editor > save changes
seriously
for fuck sake
PAY ATTENTION
@tereško ok :-)
done
I go back to putty ?
no
there is an sshd service running on your server and you need to restart it
22:22
ok, how ?
if you write: service -l
ok so ?
it will list all the available services
yes, exactly
if you write: service -l | grep ssh
it will list all service that have "ssh" in the name
22:23
I gives me "sshd"
so, you know that service is called sshd
to restart it you write: service sshd restart
ok, how restatr it ?
ah ok
and now you go back to putty
done
ok
one question:
try to log in root@localhost with putty
22:25
vm windows is like a command line ?
@tereško ok
did you get in now?
CONNECTED :) ! Huraa !
@tereško yes, exactly seems are the same
so, now the VM window and putty window both are connected to the same server
those are two separate terminals, but with exactly the same functionality
@tereško yes !
"terminals" is a word that I searched for it few min ago :-)
so I have a VPS, right ?
yes
ko, but we did a bad thing here
22:28
?
the security of your system was lowered, because you permitted for a root to directly connect to a server
how should I increase it ?
I should to limit myself :-P
?
you need to be able to log in with out "sajad" username instead
but, when you created that user, I explicitly told you not to enable "password login"
now, @Sajad, go you have puttygen
if you don't, you can download it here: chiark.greenend.org.uk/~sgtatham/putty/download.html
(I hope you can access that page)
The latest release version (beta 0.65) ?
or
The latest development snapshot ?
pick "release", you want the stable version
22:33
downloaded !
you will be generating an RSA key .. read later: en.wikipedia.org/wiki/Public-key_cryptography
@tereško ok
launch the exe file and click "generate" button
I did
it should be telling you to wave mouse around to to generate "random data"
did you get the bar filled?
22:35
OMG !!!!!!
when I move my mouse, It will fill !
really and really intresting !
what you are doing there is creating random information
kinda like salt for password hashing
@tereško yes!
very good ! I like it !
done
ok .. you got it filled, I assume
@tereško correct !
there is two this:
key fingerprint
key comment
I would recommend to set comment to: sajad@laptop
or something like that
it weill just be there to help you recognise it later
22:37
aha ok
and for passphrase you put some password (not the same as root)
ok
and press Generate ?
no
now you want to save the private key
so what ?
ah ok
it want me a path
I would recommenf name: freebsd-vm.ppk
and put it in your windows user folder
or you could create a separate "keys" folder
22:40
@tereško windows user folder ? where is that ?
it should be the one that the "save file" dialog opened
with "downloads", "desktop", "video" and other crap
your mean is my documents ?
user folder is C:/users/<your username>
ah ok
now I create a folder here
?
I would
22:43
here is a folder: VirtualBox VMs
I can use it ?
no, don't put your keys there
ok
have a separate folder
ok done
so Generate ?
22:45
:)
ok
in tame you will have more keys .. for example, github or bitbucket
ok .. now you need to register that key for the user
go to putty, where you logged in with root
ok
and type in: su sajad
and then: cd /home/sajad
sajad@sajad:~:
22:47
@AnmolRaghuvanshi morning, but please don't say anything now:)
@tereško I did
i could type
ok, on linux and bsd hidden files and folder start with . (a dot)
to see them you have to write: ls -la
do that and check if there is a folder ".ssh"
(it probably wont be there)
@Sajad ?
there is several files
but not ".ssh"
so, you need to create that directory: mkdir .ssh
done
22:51
(as you might guess, it stands for "make directory")
.ssh added to my list
and inside that directory you will create "authorized_keys" file: ee .ssh/authorized_keys
(it will open an empty text editor)
"ee" will open an empty text editor ?
you have to write: ee .ssh/authorized_keys
I did not create authorized_keys yet
22:54
if you try to open a file, which does not exist, then the file will be crated, when you save on exit
ow ! got it
I opened it via a editor
ok, now, switch back to puttygen
ok
and all of the content that is in the gray field
so
22:55
it will start with something like ssh-rsa AAAA....
it is a big string !
a lot of content and it will end with ...== sajad@laptop
yes
copy all of it
ok
so ?
now, back to putty
ok
22:56
you need to paste it in the editor
how ? ctrl+V does not work
IIRC, you could to that in putty by pressing "right-click"
ah ok :)
so ?
I save it ?
did it work?
if yes, then save it
yes
22:57
esc > leave > save
ok done
and to complete this thing, you will need to change the permissions for that file
which file ?
authorized_keys
ah ok
I open it again via editor ?
22:58
no
how to change the permissions ?
you can do that with command: chmod 600 .ssh/authorized_keys
and: chmod 700 .ssh
I just write chmod 600 .ssh/authorized_keys in putty ?

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