close
System Services

1.SSH: Secure Shell

can copy files securely
#scp host:/etc/hosts /etc/hosts

can execute commands remotely
#ssh root@host 'ifconfig eth0'

*ssh-agent
遠端連線不需輸入密碼可直接登入

#ssh-keygen -d
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
a6:98:5b:9c:25:d0:c1:1d:9d:e2:f0:55:a6:e5:bc:b0 root@server1.example.com


#ssh-copy-id -i .ssh/id_dsa.pub root@server118.example.com
[root@server1 ~]# ssh-copy-id -i .ssh/id_dsa.pub root@192.168.0.118
15
root@192.168.0.118's password:
Now try logging into the machine, with "ssh 'root@192.168.0.118'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

測試:
[root@server1 ~]# ssh 192.168.0.118
Last login: Sun Jul 19 20:16:31 2009 from 192.168.0.254
[root@server118 ~]# (不需鍵入密碼,直接登入, 時機通常用在特殊的帳號, ex: backup user)


#ssh -X root@host
可傳回x-window畫面
arrow
arrow
    全站熱搜

    aquatower 發表在 痞客邦 留言(0) 人氣()