| SSH |
WebHome | UnixGeekTools | Geekfarm | About This Site
Pointers
ssh forwarding
- example: ssh -v -2 -L2003:remotehost:22 jet
- SshX11Forwarding - forwarding x11 over ssh
- SSHKeychain - OSX application
- quiet warnings with keys when forwarding ssh thru ssh
ssh -o NoHostAuthenticationForLocalhost=yes -p 8889 -q localhost
proxy
Debugging
- permissions on home directory
- permissions on .ssh directory
- permissions on private key
- Permsssions on authorized_keys2
running server in debug mode
- info for debugging an issue with the sshd daemon where you don't
have root or don't have local access and don't want to risk
shutting down your running sshd daemon
- simply start an sshd daemon on an alternate port in debug mode:
- generate a key to use as a host key (ssh-keygen -t dsa -f test_host)
- run sshd in debug mode on a separate port (/usr/local/sbin/sshd -p 5138 -Dd -h test_host)
- connect to the new instance (ssh -p 5138 user@server)
Forced commands
- provide access to a key to run a single command
- add to authorized_keys2
command="ssh -l skipper S" ...key..
Weird stuff
- ssh encryption protocol can be set to 'none'.
X11 forwarding insecurity Overview
a malicous user (with root privilege) can just take a copy of the
cookie out of the connected users .Xauthority file, placing this
information into their own .Xauthority file and then connecting to the
X-server on the SSH client's side.
If xauth is replaced on the server by a malicious program that does
both of the following:
- runs xauth, adding in the "correct" information allowing the
children of the session to tunnel X11 programs through the
SSH session
- runs xauth, adding in the "malicious" information, allowing
a malicious source to tunnel X11 programs through the SSH
session.
With the added data in .Xauthority, a malicious source can fully
control the client X session. The malicious source can then do most
anything to the X session, from logging keystrokes of the X session,
to taking screen captures, to typing in commands to open terminals.
the client is the one accepting risk by forwarding X11, not the
server.
Updated Sun Jul 23, 2006 12:13 PM