-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpresentation.txt
97 lines (59 loc) · 2.07 KB
/
presentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
List of shit ssh can do
=======================
* remote terminal
* run one-off remote commands
* (can you run full-screen curses commands like top?)
* pass a flag to use a fake TTY?
* remote GUI
* tunneling
* transfer files (scp, rsync)
* mount remote file systems (fuse)
* steal the rest of this list from the UTOS ssh presentation!
* try to give credit for stealing shit
Multiple Connections
====================
* control master
Multiple-Hop Tunneling
======================
Requires netcat on the intermediate host::
ssh -oproxycommand="ssh -qaxT firewall nc %h %p" -L 5432:localhost:5432 dbserver
Can't background::
ssh -t -L 5432:127.0.0.1:9991 firewall.example.com \
ssh -t dbserver \
ssh -t -R 9991:127.0.0.1:5432 firewall
altering an existing connection
===============================
* adding a tunnel on the fly?
* builtin ssh command line:
* ~C
* ~#
* check the manpage for ESCAPE CHARACTERS
reverse tunnels
===============
* add a tunnel from the remote to the local?
key-based authentication
========================
File permissions matter when using key-based auth (but not password?)
Edit a Remote File
==================
.. note::
This requires Vim with the netrw plugin.
``vim scp://host//path/to/file``
Play Sound Through a Remote Speaker
===================================
.. note::
The sound quality is very bad.
``dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp``
stdin and stdout
================
``wget -O - http://ftp.mozilla.org/.../thunderbird-3.0b2-i686.tar.bz2 \
| ssh remote_machine 'tar xjvf -'``
diffing remote files
====================
``ssh [email protected] "cat /tmp/remotefile" | diff - /tmp/localfile``
``vimdiff scp://[email protected]//tmp/remotefile /tmp/localfile``
opening a tunnel may open be open to anyone!
============================================
When you open a socket on your machine, if not explicity bound to localhost, it
may be open to anyone else on your network! (if you're not running a firewall.)
* Does ssh bind to localhost only be default?