Linux系统中OpenSSH的安装配置7
用下面的命令,登录远程计算机:
[root@deep]# ssh
例如:
[root@deep]# ssh username www.openarch.com
username@deep.openarch.com’s password:
Last login: Tue Oct 19 1999 18:13:00 -0400 from gate.openarch.com
Welcome to www.openarch.com on Deepforest.
是用来登录ssh服务器的用户名,是ssh服务器主机的地址。
scp
可以用这个命令把文件从本地计算机拷贝到远程计算机,或者反之,甚至可以在两台远程计算机之间用“scp”命令拷贝文件。把远程主机上的文件拷贝到当前目录的一个简单的方法如下。
用下面的命令把文件从远程主机拷贝到本地主机上:
[root@deep /]# su admin
[admin@deep /]$ scp -p :/dir/for/file localdir/to/filelocation
例如:
[username@deep]$ scp -p username@mail:/etc/test1 /tmp
Enter passphrase for RSA key username@mail.openarch.com:
test1 | 2 KB | 2.0 kB/s | ETA: 00:00:00 | 100%
用下面的命令把文件从本地主机拷贝到远程主机上:
[root@deep /]# su admin
[admin@deep /]$ scp -p localdir/to/filelocation :/dir/for/file
例如:
[username@deep]$ scp -p /usr/bin/test2 username@mail:/var/tmp
username@mails password:
test2 | 7 KB | 7.9 kB/s | ETA: 00:00:00 | 100%
注意:“-p”选项表示文件的改变和访问时间属性以及权限,在拷贝过程中被保留。通常是需要这样的。
安装到系统中的文件
> /etc/ssh
> /etc/ssh/ssh_config
> /etc/ssh/sshd_config
> /etc/ssh_host_key
> /etc/ssh_host_key.pub
> /usr/bin/ssh
> /usr/bin/slogin
> /usr/man/man1/ssh.1
> /usr/man/man1/scp.1
> /usr/man/man1/ssh-add.1
> /usr/man/man1/ssh-agent.1
> /usr/man/man1/ssh-keygen.1
> /usr/bin/scp
> /usr/bin/ssh-add
> /usr/bin/ssh-agent
> /usr/bin/ssh-keygen
> /usr/man/man1/slogin.1
> /usr/man/man8/sshd.8
> /usr/sbin/sshd
Windows平台上免费的SSH客户软件
Putty
Putty的主页:http://www.chiark.greenend.org.uk/~sgtatham/putty.html
Tera Term Pro and TTSSH
Tera Term Pro的主页:http://hp.vector.co.jp/authors/VA002416/teraterm.html
TTSSH Homepage:http://www.zip.com.au/~roca/download.html
http://netadmin.77169.com/HTML/20040623000600.html