30 mei 2006 14:05
Genereer een key pair:
[robin@fromhost ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/robin/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/robin/.ssh/id_dsa.
Your public key has been saved in /home/robin/.ssh/id_dsa.pub.
The key fingerprint is:
75:ed:f7:06:00:02:65:3e:4d:7b:fb:cf:4c:59:fc:63 robin@fromhost
Kopieer public key naar de remote host:
[robin@fromhost ~]$ scp .ssh/id_dsa.pub robin@tohost:/home/robin/
Password:
id_dsa.pub 100% 1131 1.1KB/s 00:00
Voeg de public key toe aan de lijst met geauthorizeerde keys:
robin@tohost$ cat id_dsa.pub >> .ssh/authorized_keys
Zorg dat je .ssh directory en de lijst met keys niet world-readable zijn:
robin@tohost$ chmod 600 .ssh/authorized_keys
robin@tohost$ chmod 700 .ssh
Altijd handig
- 0 Reacties
23 mei 2006 13:58
$ printf "robin\0robin\0geheim" | mmencode
cm9iaW4Acm9iaW4AZ2VoZWlt
$ telnet smtphost 25
Trying 18.67.13.317
Connected to smtphost.
Escape character is "^]".
220 Domain.com SMTP Server
HELO mailserver
250 smtp.domain.com
AUTH PLAIN cm9iaW4Acm9iaW4AZ2VoZWlt
235 Authentication successful
$ printf "robin" | mmencode
cm9iaW4=
$ printf "geheim" | mmencode
Z2VoZWlt
$ telnet smtphost 25
Trying 18.67.13.317
Connected to smtphost.
Escape character is "^]".
220 Domain.com SMTP Server
HELO mailserver
250 smtp.domain.com
AUTH LOGIN
334 VXNlcm5hbWU6
cm9iaW4=
334 UGFzc3dvcmQ6
Z2VoZWlt
235 Authentication successful
Let op: Gebruik geen echo in plaats van printf; echo stuurt \n !
Altijd handig
- 0 Reacties
$ telnet pop3host 110
Trying 18.67.13.317
Connected to pop3host.
Escape character is "^]".
+OK Hello there.
USER robin
+OK Password required.
PASS geheim
+OK logged in.
Altijd handig
- 0 Reacties
AUTH=LOGIN
$ telnet imaphost 143
Trying 18.67.13.317...
Connected to imaphost.
Escape character is "^]".
* OK
01 LOGIN robin geheim
01 OK Logged in.
AUTH=PLAIN
$ printf "robin\0robin\0geheim" | mmencode
cm9iaW4Acm9iaW4AZ2VoZWlt
$ telnet imaphost 143
Trying 18.67.13.317...
Connected to imaphost .
Escape character is '^]'.
* OK
01 AUTHENTICATE PLAIN
+
cm9iaW4Acm9iaW4AZ2VoZWlt
01 OK Logged in.
Altijd handig
- 0 Reacties