Login auf einer entfernten Maschine, eigene Keys konfiguriert
hot@kirke 3 > ssh tantalus
For copyrights see /etc/copyright.save
Terminal type ?(xterms):
hot@tantalus-f 1 >
hot@kirke 9 > ssh -v tantalus
SSH Version 1.2.13 [sparc-sun-sunos4.1.3_U1], protocol version 1.3.
Standard version. Does not use RSAREF.
Reading configuration data /home/ying/staff/hot/.ssh/config
Reading configuration data /etc/ssh_config
ssh_connect: getuid 324 geteuid 0 anon 1
Connecting to tantalus [134.109.2.3] port 22.
Connection established.
Remote protocol version 1.3, remote software version 1.2.13
Waiting for server public key.
Received server public key (512 bits) and host key (1024 bits).
Host 'tantalus' is known and matches the host key.
Initializing random; seed file /home/ying/staff/hot/.ssh/random_seed
Encryption type: idea
Sent encrypted session key.
Received encrypted confirmation.
Remote: Server does not permit empty password login.
Trying RSA authentication with key 'hot@ying'
Received RSA challenge from server.
Sending response to host key RSA challenge.
Remote: RSA authentication accepted.
RSA authentication accepted by server.
Requesting pty.
Requesting X11 forwarding with authentication spoofing.
Requesting shell.
Entering interactive session.
For copyrights see /etc/copyright.save
Terminal type ?(xterms):
hot@tantalus-f 1 > echo $DISPLAY
134.109.2.3:2.0
hot@tantalus-f 2 >
Login auf einer entfernten Maschine, keine Keys konfiguriert, kein .[rs]hosts
hot@tantalus-f 6 > ssh samson Password: Last login: Thu Mar 14 16:55:10 1996 from ying.informatik. I have a good message for you. You work with SOLARIS!! Terminal type ?(xterms): hot@samson 1 >
Login auf einer entfernten Maschine, keine Keys konfiguriert, .shosts existiert
hot@samson 11 > ssh mmu Last login: Sat Mar 23 13:36:30 1996 from merkur.informati I have a good message for you. You work with SOLARIS!! Terminal type ?(xterms): hot@mmu 1 > cat .shosts samson.hrz.tu-chemnitz.de hot hot@mmu 2 >
Ausführung von Kommandos auf der entfernten Maschine
hot@kirke 7 > ssh mmu.hrz ls -l /etc/dfs /etc/sshrc.sh: /dev/tty: cannot open total 4 -rw-r--r-- 1 root sys 232 Oct 10 1994 dfstab -rw-r--r-- 1 root other 45 Oct 10 1994 fstypes hot@kirke 8 >
Kopieren von Dateien von einer Maschine auf eine andere
hot@kirke 3 > ls -l ssh.html ssh.html: No such file or directory hot@kirke 4 > scp hot@tantalus:~/public_html/ssh/ssh.html . /etc/sshrc.sh: /dev/tty: cannot open hot@kirke 5 > ls -l ssh.html -rw------- 1 hot staff 27657 Apr 10 12:39 ssh.html hot@kirke 6 >
Nutzung der integrierten Port-Weiterleitung
Beispiel: Vermeidung von Klartext-Paßwörtern bei FTP
client zu
ftp-serv:
ssh -L 2345:ftp-serv:21 ftp-serv
ssh -f -L 2345:ftp-serv:21 ftp-serv ./ssh_pause
mit ssh_pause.c:
main()
{
pause();
}
ssh_pause anschließend von Hand killen !!
client
ftp client 2345
Hinweis: Nicht localhost statt client verwenden,
da sonst wahrscheinlich keine Datenverbindung möglich ist.
Beispiel: Schutz der IMAP-Verbindung von Pine
ssh -L 2346:imap-serv:143 imap-serv
.pinerc modifizieren:
inbox-path={localhost:2346}
ssh-agent starten
awk) in .pinerc eintragen
pine starten
ssh-agent beenden
Holger Trapp, April 1996