Chinaunix首页 | 论坛 | 博客
  • 博客访问: 33147
  • 博文数量: 14
  • 博客积分: 350
  • 博客等级: 一等列兵
  • 技术积分: 90
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-27 13:53
文章分类
文章存档

2011年(14)

我的朋友
最近访客

分类: LINUX

2011-04-27 14:30:12

  简介

  SSH is a protocol that allows computers to communicate with each other over encrypted connections. SSH是一种协议,它允许计算机相互通信通过加密连接其他。 An SSH client is used to log in to a remote machine (running an SSH server) and allows the execution of commands on that machine. SSH客户端是用于登录到远程计算机(运行一个SSH服务器),并允许该计算机上的命令的执行。 Examples of what SSH can be used for are:什么SSH可以用于例如: Access to the UNIX-like environment from a Windows machine;访问从Windows机器类似UNIX的环境;

  Work from home with access to your filestore;从与工作访问您的文件存储的家;

  Copying files between your CS filestore and another machine;复制文件之间你的CS文件存储和另一台机器;

  Read restricted web pages (such as 'csonly' parts of the intranet).网页阅读限制(如'csonly的内联网部分)。

  Other protocols, such as RSH and Telnet, allow computers to communicate in a similar way to SSH.其他协议的Telnet, 如 rsh,并允许计算机进行通信以类似的方式使用SSH。 These protocols are now considered insecure and machines in the department no longer allow RSH or Telnet connections.这些协议现在被认为是不安全的,在该部机器不再允许RSH或Telnet连接。 What You Will Need您需要什么

  You will need an SSH client for your system:你需要在你的系统的SSH客户端: OpenSSH is available for Linux and other UNIX-like operating systems. OpenSSH的是系统可用于Linux和其他Unix - like的作业。

  Pre-packaged versions are available for Linux distributions:预包装版本是可用于Linux发行版: For Redhat the package is called "openssh"对于Redhat的包被称为“OpenSSH的”

  For Debian the package is called "ssh"对于Debian包被称为“SSH的”

  PuTTY is a graphical SSH client for Windows. 腻子是一个图形化的Windows SSH客户端。 There is also a Linux port available in the Debian package archive.还有一个Linux移植存档可以在Debian软件包。 Remote Logins to Computer Science Machines远程登录到计算机科学机

  RS0 (rs0.cs.man.ac.uk/130.88.199.3) has been set aside for remote logins. ? 0元(rs0.cs.man.ac.uk/130.88.199.3)已预留远程登录。 Using SSH使用SSH

  Shell login壳牌登录

  For an interactive session at the command prompt (shell) the syntax is:对于在命令提示符下交互会话(壳)的语法是:

  ssh user @ hostSSH 用户 @ 主机 user用户

  Your teaching domain Unix login name.您的教学领域的Unix登录名。

  host主机

  The machine to login to.本机登录。

  For example, to login to rs0.cs.man.ac.uk as user smithj2 :例如,登录到rs0.cs.man.ac.uk作为用户smithj2: $ssh smithj2@rs0.cs.man.ac.uk $ssh的smithj2@rs0.cs.man.ac.uk

  A message similar to the following may be displayed:类似的消息可能会显示如下: The authenticity of host 'rs0.cs.man.ac.uk (130.88.199.3)' can't be established.在'真实性主机rs0.cs.man.ac.uk(130.88.199.3)不能成立。RSA key fingerprint is bb:9a:2e:70:c1:9e:b2:73:e9:a0:3b:5f:a0:eb:2c:8a.RS A密钥指纹是BB:第9A:2e的:70:C1的:9E条:格B2:73:九个人口众多:a0的:第3B:5层:a0的:光大:2C型:8A条。Are you sure you want to continue connecting (yes/no)?您确定要继续连接(是/否)?

  This is a check to make sure that another machine is not masquerading as the remote machine.这是一个检查,以确定是不是另一台机器作为远程机器伪装。 In most cases it is safe to say 'yes'.在大多数情况下,可以肯定地说'是'。

  Enter your password at the prompt and you will be presented with your shell command line:在提示输入您的密码,你将与你的shell命令行介绍: smithj2@rs0.cs.man.ac.uk's password:smithj2@rs0.cs.man.ac.uk的密码:Last login: Sun Sep 14 14:11:57 2003 from myhost.mydomain.com最后登录时间:9月14日14点11分57秒太阳2003年myhost.mydomain.comYour Operating System is Linux您的作业系统是LinuxWelcome to ...欢迎光临...the teaching domain在教学领域Checking your file quota...检查你的文件配额...Okay好smithj2@rs0->smithj2 @ ? 0元,>

  Login over a slow connection通过慢速连接登录

  To enable compression add the '-C' option:为了使压缩添加'- c'选项:

  ssh -C user @ host的ssh - C 用户 @ 主机

  This is useful if you are logging in from home on a dialup connection.这是有用的,如果你是在家中登录一个拨号连接。 Forward X connections远期X连接

  If you want to run programs with a graphical interface (you need to be running X on your machine):如果你想运行一个图形界面程序(你需要你的机器上运行X)的:

  ssh -X user @ host的ssh - X 用户 @ 主机 Example: Log in and open a document in 'gv':范例:登录并打开一个在'gv的'文件: $ssh -X smithj2@rs0.cs.man.ac.uk smithj2@rs0.cs.man.ac.uk's password: Last login: Sun Sep 14 14:11:57 2003 from myhost.mydomain.com Your Operating System is Linux Welcome to ...$的ssh - X的smithj2@rs0.cs.man.ac.uk smithj2@rs0.cs.man.ac.uk 的密码:上次登录时间:9月14日14时十一分57秒2003年myhost.mydomain.com您的操作系统是Linux欢迎来...the teaching domain Checking your file quota...在教学领域检查您的文件配额...Okay smithj2@rs0->gv report.ps 好吧smithj2 @ ? 0元->货车report.ps

  Port forwarding端口转发

  Local port forwarding is used to access a service on a remote machine by accessing the local machine.本地端口转发是用于访问远程计算机上通过访问本地计算机上的服务。 Start port forwarding with the syntax:语法启动与端口转发:

  ssh -L local_port : remote_host : remote_port user @ host的ssh - L的local_port:remote_host:remote_port用户 @ 主机 local_portlocal_port

  Port to forward from the local machine.端口转发从本地计算机。 Any unused port number between 1024 and 49151 may be used. 1024和49151之间的任何未使用的端口号可能被使用。

  remote_hostremote_host

  The machine providing the service that is being forwarded.本机提供的是被转发服务。

  remote_portremote_port

  The port on remote_host to forward to.该remote_host端口转发到。 This is the port that the service is listening on.这是该服务的端口正在侦听。 For example, port 80 is most commonly used by HTTP servers.例如,端口80是最常用的HTTP服务器。

  To access restricted parts of the Computer Science website:要访问计算机科学网站限制部分: $ssh -L 8000: smithj2@rs0.cs.man.ac.uk smithj2@rs0.cs.man.ac.uk's password: Last login: Tue Sep 16 15:37:24 2003 from myhost.mydomain.com Your Operating System is Linux Welcome to ...$的ssh - L的8000: smithj2@rs0.cs.man.ac.uk smithj2@rs0.cs.man.ac.uk 的密码:上次登录时间:9月16日星期二15:37 :2003年24 myhost.mydomain.com您的操作系统是Linux的欢迎...the teaching domain Checking your file quota...在教学领域检查您的文件配额...Okay smithj2@rs0->好吧smithj2 @ ? 0元,>

   can now be accessed through . 现在可以通过访问 。

  Go to csonly/php/services/ to view the Computing Facilities web page.前往csonly/php/services/以查看电脑设施的网页。 Using PuTTY使用PuTTY

  Shell Login壳牌登录

  Run putty.运行腻子。 You will see the PuTTY Configuration window.您将看到的PuTTY配置窗口。

  

  In the Session category enter the Host Name (eg: rs0.cs.man.ac.uk).在会话类输入主机名称 (例如:rs0.cs.man.ac.uk)。

  Select the SSH Protocol and make sure the Port is set to 22 .选择SSH 协议 ,并确保端口设置为22。

  

  Select Open at the bottom of the window.选择打开在窗口底部。 A dialog box may be displayed asking you to confirm the authenticity of the host.一个对话框,要求您可能会显示确认主机的真实性。 This is a check to make sure that another machine is not masquerading as the remote machine.这是一个检查,以确定是不是另一台机器作为远程机器伪装。 In most cases it is safe to click Yes .在大多数情况下是安全的单击是。

  

  Enter your teaching domain Unix login name at the 'login as:' prompt in the terminal window .输入域名的Unix登录名在你的教学作为登录:'提示在终端窗口。

  Enter your password when prompted.输入您的密码提示时。

  

  Setting The Terminal Font设置终端字体

  If the default font for the PuTTY terminal is too small you can change it in the configuration dialog.如果为腻子终端默认字体太小,你可以改变它的配置对话框。 Select Appearance from the Window category on the left of the configuration dialog.选择外观从配置对话框窗口类左侧的。

  

  In the Set the font used in the terminal window section, click on Change... and use the font dialog to select a readable font.在设置使用的字体在终端窗口部分,点击更改...并使用字体对话框来选择一个可读的字体。

  Login over a slow connection通过慢速连接登录

  For slow connections PuTTY can use compression to speed up data transfer.连接速度慢的PuTTY可以使用压缩来加快数据传输。 Select SSH from the Connection category on the left of the configuration dialog. 选择 SSH 连接从配置对话框类左侧的。

  Tick the Enable compression box.勾选启用压缩箱。

  

  Forward X connections远期X连接

  X forwarding is used to allow graphical applications from the remote host to be displayed on the local host. X转发用于允许从远程主机的图形将显示在本地主机上的应用。 Getting an X server for Windows获取用于Windows的X服务器

  You need to be running an X server on your machine to display remote programs:你需要你的机器上运行远程程序显示一个X服务器: Exceed is a commercial X Server. 超越是一个商业X服务器。 It is available on the Windows machines in the department and on the IT Services public cluster PCs.这是在该部Windows计算机可用,对IT服务的公共集群电脑。

  Cygwin/XFree86 is a port of XFree86 to Microsoft Windows. Cygwin/XFree86 XFree86的端口是微软的Windows。 It runs on top of Cygwin and is installable using Cygwin's package installer.它运行在Cygwin的上方,安装使用Cygwin的安装程序包。

  X forwarding in PuTTY在X转发腻子

  Select Tunnels from the Connection: SSH category on the left of the configuration dialog.选择从隧道连接:SSH的配置对话框类左侧的。

  Tick the box marked Enable X11 forwarding the the X11 forwarding section.栏内打勾启用X11转发的X11转发部分。

  

  Port forwarding端口转发

  Local port forwarding is used to access a service on a remote machine by accessing the local machine.本地端口转发是用于访问远程计算机上通过访问本地计算机上的服务。 Select Tunnels from the Connection: SSH category on the left of the configuration dialog.选择从隧道连接:SSH的配置对话框类左侧的。

  Under Add new forwarded port:在添加新的转发端口:

  Enter the local port to forward in the Source port box.输入本地端口转发在源端口框中。 Any unused port number between 1024 and 49151 may be used. Example: 8000任何未使用的端口1024和49151之间的数字可以使用:。范例8000

  Enter the name of the machine providing the service, followed by a colon (':', withouth quotes) and the port to forward to in the Destination box. Example: 输入引号名称 withouth 机器提供(':',服务,其次是一个冒号)和端口转发到目标框:。范例

  

  Select Local (underneath the Destination box).选择本地 (下目标框中)。

  Click Add to add it to the Forwarded ports: list.单击添加将其添加到转发的端口:清单。

  

  The example would allow access to using localhost:8000 .该示例将允许访问使用本地主机:8000 。 Copying Files Using scp复制文件使用scp

  A program called "scp" can be used to transfer files from one machine to another using the SSH protocol.所谓“SCP的”一个程序可用于从一台计算机传输到另一文件使用SSH协议。

  For Windows, "PSCP.EXE" is available from the PuTTY download page and has an interface very similar to the scp command.对于Windows,“PSCP.EXE”是可以从下载页面腻子 ,并有一个接口非常相似的scp命令。

  scp user @ host : file1 file2SCP的用户 @ 主机: 档案1档案2

  scp file1 user @ host : file2SCP的文件1用户 @ 主机: 档案2 To copy the file 'report.ps' from the home directory of smithj2 to the current directory: smithj2复制到当前目录的文件'从'report.ps的主目录: $scp smithj2@rs0.cs.man.ac.uk:~/report.ps . $SCP的smithj2@rs0.cs.man.ac.uk:?/ report.ps。 smithj2@rs0.cs.man.ac.uk's password:smithj2@rs0.cs.man.ac.uk的密码:report.ps 100% 164KB 4.2KB/s 00:38report.ps 100%164KB 4.2KB /秒00:38

  To copy all files in the 'test' directory to smithj2 's 'test' directory:要复制'目录中的所有文件,测试smithj2的'测试'目录: $scp test/* smithj2@rs0.cs.man.ac.uk:~/test/ $SCP的测试/ * smithj2@rs0.cs.man.ac.uk:?/测试/ smithj2@rs0.cs.man.ac.uk's password:smithj2@rs0.cs.man.ac.uk的密码:file1 100% 26KB 3.3MB/s 00:00文件1 100%26KB 3.3MB /秒00:00file2 100% 3055 565.7KB/s 00:00file2的100%,3055 565.7KB /秒00:00file3 100% 191 323.8KB/s 00:00file3的100%,191 323.8KB /秒00:00

  <

Linux 操作系统是UNIX 操作系统的一种系统。它诞生于1991 年的10 月5 日(这是第一次正式向外公布的时间)。以后借助于Internet 网络,并经过全世界各地计算机爱好者的共同努力下,现已成为今天世界上使用最多的一种UNIX 类操作系统,并且使用人数还在迅猛增长。  Linux 操作系统的诞生、发展和成长过程始终依赖着以下五个重要支柱:UNIX 操作系统、MINIX 操作系统、GNU 计划、POSIX 标准和Internet 网络。

阅读(2088) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~