:: install dependency
installing ssh-client (Debian)
|
1 |
# aptitude install openssh-client |
:: configure ssh / scp login without password authentication
+ generate dsa keygen
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[ tox : ~ ]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/tox/.ssh/id_dsa):
Enter passphrase (empty for no passphrase): [ just return/enter ]
Enter same passphrase again: [ just return/enter ]
Your identification has been saved in /home/tox/.ssh/id_dsa.
Your public key has been saved in /home/tox/.ssh/id_dsa.pub.
The key fingerprint is:
e0:be:0a:93:b9:01:d2:4a:18:25:fa:d8:8b:48:13:9b tox@blackonsole
The key’s randomart image is:
+–[ DSA 1024]—-+
|. . |
|.o |
|o. . |
|.*+ . . |
|=E+ . S |
|=+.+ . |
|+ B . |
| = . |
| . … |
+—————–+ |
+ copy [ scp ] dsa keygen to SSH Server (10.100.100.35)
|
1 2 |
[ tox : ~ ]$ scp .ssh/id_dsa.pub username@10.100.100.35:~username/.ssh/authorized_keys
Password : [ usernamepass ] |
make sure the .ssh directory is at the username home directory on 10.100.100.35.
:: testink
+ ssh
|
1 2 3 4 5 |
[ tox : ~ ]$ ssh username@10.100.100.35
Last login: Wed Nov 11 10:40:56 2009 from 10.100.100.33
Have a lot of fun…
[ username: ~ ]$ whoami
username |
+ scp
|
1 2 3 4 |
[ tox : ~ ]$ scp username@10.100.100.35:/tmp/test /tmp
test 100% 0 0.0KB/s 00:00
[ tox : ~ ]$ ls -l /tmp/test
-rw-r–r– 1 tox tox 0 2009-11-11 20:22 /tmp/test |
:: links
+ google