mirror of https://framagit.org/kyodev/kyopages.git
71 lines
2.0 KiB
Markdown
71 lines
2.0 KiB
Markdown
|
# accès ssh
|
||
|
|
||
|
## activer serveur
|
||
|
|
||
|
installer le paquet du serveur ssh
|
||
|
```
|
||
|
su
|
||
|
apt install openssh-server
|
||
|
```
|
||
|
connaitre ip du serveur: `ip -4 a`
|
||
|
|
||
|
## accès du client
|
||
|
pour se connecter sur le root du serveur distant
|
||
|
```
|
||
|
ssh ssh root@ipServeur
|
||
|
```
|
||
|
pour se connecter sur un user du serveur distant
|
||
|
```
|
||
|
ssh user@ipServeur
|
||
|
```
|
||
|
exemple, 1ère connection
|
||
|
```
|
||
|
The authenticity of host '192.168.1.110 (192.168.1.110)' can't be established.
|
||
|
ECDSA key fingerprint is SHA256:JGdDOGFf2MkfVk1Cr6uNrw6GjcKAoKnke9WA0z5uI1A.
|
||
|
Are you sure you want to continue connecting (yes/no)? y
|
||
|
Please type 'yes' or 'no': yes
|
||
|
Warning: Permanently added '192.168.1.110' (ECDSA) to the list of known hosts.
|
||
|
kyodev@192.168.1.110's password:
|
||
|
Linux tosh 4.9.0-3-686-pae #1 SMP Debian 4.9.30-1 (2017-06-04) i686
|
||
|
|
||
|
The programs included with the Debian GNU/Linux system are free software;
|
||
|
the exact distribution terms for each program are described in the
|
||
|
individual files in /usr/share/doc/*/copyright.
|
||
|
|
||
|
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
|
||
|
permitted by applicable law.
|
||
|
|
||
|
su -
|
||
|
par défaut, le serveur ssh interdit à root de se connecter
|
||
|
donc faut se connecter en user, puis passer root
|
||
|
nmap '192.168.1.*'
|
||
|
très long
|
||
|
nmap -T4 -sP 192.168.1.0/24
|
||
|
rapide mais pas de hostname
|
||
|
nmap -T4 -sP 192.168.1.*
|
||
|
idem
|
||
|
|
||
|
mkdir /home/famille2
|
||
|
chown famille2: /home/famille2
|
||
|
chmod 755 /home/famille2
|
||
|
cp /etc/skel/* /home/famille2
|
||
|
chown famille2: /home/famille2/*
|
||
|
|
||
|
apt install john
|
||
|
john /etc/shadow
|
||
|
|
||
|
|
||
|
|
||
|
To enable the XDMCP server in LightDM edit /etc/lightdm/lightdm.conf and add the following section:
|
||
|
|
||
|
[XDMCPServer]
|
||
|
enabled=true
|
||
|
|
||
|
Then restart LightDM with sudo restart lightdm from a text console (logout from any graphical sessions first).
|
||
|
|
||
|
You can set the XDM-AUTHENTICATION-1 key by setting key=value (value is in the same format as is used in the X -cookie option). If the key is not set then no authentication is used.
|
||
|
|
||
|
You can change the UDP/IP port by setting port=1234.
|
||
|
|
||
|
All the available LightDM settings are shown in the example configuration in /usr/share/doc/lightdm/lightdm.conf.
|