Ssh schnelleinstieg
Version vom 21. November 2019, 21:07 Uhr von Thomas.will (Diskussion | Beiträge)
Verbindungsaufbau vereinfacht
Server
Installation
- apt-get install ssh
Konfig Verzeichnis
/etc/ssh
Konfigurationsdatei
Beispiel
- cat /etc/ssh/sshd
Port 22 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key PermitRootLogin prohibit-password ChallengeResponseAuthentication no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server PasswordAuthentication yes
start,stop,restart,status
- systemctl start ssh
- systemctl stop ssh
- systemctl status ssh
- systemctl restart ssh
Client
Konfigurations Verzeichnis
/etc/ssh
Heimat Verzeichnis
~/.ssh
remote login
- ssh harald@rechner
- ssh -l harald rechner
- ssh -p 22 -l harald rechner
Ausführen eines Programs auf einem anderem Rechner
- ssh harald@rechner date
- ssh harald@rechner pwd
- ssh harald@rechner ls -l
Secure copy
local to remote
file
- scp /etc/hosts harald@rechner:/tmp
directory
- scp -r /bin harald@rechner:/tmp
