SSH
Wer ist das da vorne?
 Martin Leyrer
 IT Specialist aka. “Mädchen für Alles” bei einem int. IT-
Dienstleister
 E-mail: leyrer@gmail.com
 Twitter: http://www.twitter.com/leyrer
 Facebook: https://www.facebook.com/leyrer
 Blog: http://martin.leyrer.priv.at
 LinkedIn: http://at.linkedin.com/in/leyrer
 Xing: www.xing.com/profile/Martin_Leyrer
 usw. ;)
Mehrfache Verbindungen
~/.ssh/config
ControlMaster auto
ControlPath /tmp/ssh_mux_
%h_%p_%r
Managing Master
Connections
Master Connection aktiv:
ssh -O check remote-host
Master Tag killen:
ssh -O exit remote-host
Dateien kopieren
 scp nutzt bestehende Verbindungen
 Bash kann remote tab completion bei
installierter “Bash Completion”
 Verbindungen können auch mit rsync, git, und
vielen anderen Tools geteilt werden
Verbindungen wiederholen
~/.ssh/config
ControlMaster auto
ControlPath /tmp/ssh_mux_
%h_%p_%r
ControlPersist 4h
Keine Paßwörter
$ ssh-keygen
$ ssh-copy-id
leyrer@ssh.example.org
oder
lokal ~/.ssh/id_rsa.pub nach
remote ~/.ssh/authorized_keys
Windows kann das auch
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Hostname Aliases
~/.ssh/config
Host demo
HostName ssh.example.com
Keine Benutzernamen
~/.ssh/config
Host demo
HostName ssh.example.com
User m3
Schlüsselwahl
~/.ssh/config
Host demo
HostName ssh.example.com
User m3
IdentityFile ~/.ssh/demo_rsa
Agenten-Weiterleitung
~/.ssh/config
Host *
ForwardAgent yes
Von Server zu Server
$ ssh ssh.example.com
m3@ssh % ssh remote.example.com
~/.ssh/config:
Host remotedemo
HostName remote.example.com
ProxyCommand ssh ssh.example.com
-W %h:%p
sshfs
$ mkdir ssh_mnt
$ sshfs demo:tmp/ ssh_mnt/
Vim und scp URLs
gvim
scp://ssh.example.com/demo.txt
Interactive Remote
Commands
-t sorgt dafür, daß die Session
steht bis das interaktive remote
command beende wurde. (top,
vim, nano, less, etc.)
Session logging
ssh demo | tee -a session.log
make faster
/etc/ssh/sshd_config:
GSSAPIAuthentication no
Top Gear Tuning Tip
Test:
yes | pv | ssh ssh.example.com
"cat > /dev/null"
Tune:
Compression yes
CompressionLevel 9
Web Proxies
Corkscrew
ProxyCommand corkscrew
proxy.example.org 8080 %h %p
Lokale App, entfernter Dienst
~/.ssh/config:
LocalForward 4242
localhost:5432
Resilient Connections
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 10
Mosh
Client:
sudo apt-get install mosh
Server:
http://tinyurl.com/d8yyaew
Probleme:
It's probably the locale
Google 2-factor
Authentication
sudo apt-get install libpam-google-authenticator
Als User ausführen: google-authenticator
/etc/pam.d/sshd:
auth required pam_google_authenticator.so
/etc/ssh/sshd_config:
ChallengeResponseAuthentication yes
https://cryptoparty.at/
Feedback
 Pentabarf
 http://glt13-
programm.linuxtage.at/
Danksagungen
Smylers für “SSH Can Do That?
Productivity Tips for Working
with Remote Servers”
maclemon für Umfangreichen
Input zu diesem Talk

Weitere ähnliche Inhalte

PDF
"Was, SSH kann auch das?" @ Linuxwochen Wien 2013
PDF
Feed me, Seymour! Supplemental User Data For IBM Connections Profiles
PDF
Look Mum, No Passwords!
PDF
The Circle of Life
PDF
The latest, ultimative final ver­sion, current release, approved, last minute...
ODP
Debugging IBM Connections for the Impatient Admin - Social Connections VII
PDF
ICON UK 2014 - Look mum, no passwords!
PDF
Social Connections VI -- Customizing Connections Profiles to Provide a Compan...
"Was, SSH kann auch das?" @ Linuxwochen Wien 2013
Feed me, Seymour! Supplemental User Data For IBM Connections Profiles
Look Mum, No Passwords!
The Circle of Life
The latest, ultimative final ver­sion, current release, approved, last minute...
Debugging IBM Connections for the Impatient Admin - Social Connections VII
ICON UK 2014 - Look mum, no passwords!
Social Connections VI -- Customizing Connections Profiles to Provide a Compan...

Mehr von Martin Leyrer (7)

PDF
Social Conndections VI -- Debugging IBM Connections During Install And Operation
ODP
Digitalks #15 - Sicherheit im Netz
ODP
Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...
ODP
Laconi.ca & Identi.ca Einführung & Setup
ODP
Effiziente Fehlersuche In Web 2.0 Anwendungen - Graz Edition
ODP
Open Source und Free Software unter Windows
ODP
Effiziente Fehlersuche in Web 2.0 Anwendungen
Social Conndections VI -- Debugging IBM Connections During Install And Operation
Digitalks #15 - Sicherheit im Netz
Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...
Laconi.ca & Identi.ca Einführung & Setup
Effiziente Fehlersuche In Web 2.0 Anwendungen - Graz Edition
Open Source und Free Software unter Windows
Effiziente Fehlersuche in Web 2.0 Anwendungen
Anzeige

Was, SSH kann auch das?