-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNouveau document texte.txt
79 lines (54 loc) · 1.84 KB
/
Nouveau document texte.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$ cd linux-ops-TreasureHunt/
$ cd Sponsors
$ grep -r "" *
> Harman_International_Industries:32353
> Beazer_Homes_USA:32065
> FreeWave_Technologies:32560
~~~~~~~~~~~
créer un utilisateur :
$ adduser xxx
> Adding user `xxx' ...
> Adding new group `xxx' (1001) ...
> Adding new user `xxx' (1001) with group `xxx' ...
> Creating home directory `/home/xxx' ...
> Copying files from `/etc/skel' ...
changer le nom d'un group :
$ groupmod --new-name yyy xxx
changer d'utilisateur :
$ su - xxx
passer en SUDO permanent :
$ sudo -s
> root@jp:/home/xxx#
Créer la clef SSH :
$ ssh-keygen -t ed25519 -a 256
Envoyer la clef :
$ ssh-copy-id [email protected]
> /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/c/Users/xxx/.ssh/id_ed25519.pub"
> /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
> /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
> [email protected]'s password:
>
> Number of key(s) added: 1
>
> Now try logging into the machine, with: "ssh '[email protected]'"
> and check to make sure that only the key(s) you wanted were added.
$ cat /etc/debian_version
> 10.11
$ mysql -v
> Welcome to the MariaDB monitor. Commands end with ; or \g.
> Your MariaDB connection id is 49
> Server version: 10.3.31-MariaDB-0+deb10u1 Debian 10
$ apache2 -v
> Server version: Apache/2.4.38 (Debian)
> Server built: 2021-12-21T16:50:43
$ php -v
> PHP 8.0.15 (cli) (built: Jan 29 2022 07:39:13) ( NTS )
> Copyright (c) The PHP Group
> Zend Engine v4.0.15, Copyright (c) Zend Technologies
> with Zend OPcache v8.0.15, Copyright (c), by Zend Technologies
$ ssh-keygen -t ed25519 -a 256
$ cat .ssh/id_ed25519.pub
nano /etc/ssh/sshd_config
passer 'PermitRootLogin yes' à 'no'
sudo passwd -l root