(3)windows远程连接ubuntu8——SSH服务

来源:互联网 发布:java mysql安装步骤 编辑:程序博客网 时间:2024/06/05 12:45

本博客(http://blog.csdn.net/livelylittlefish)贴出作者(三二一、小鱼)相关研究、学习内容所做的笔记,欢迎广大朋友指正!

 

windows远程连接ubuntu8——SSH服务

 

测试是否安装ssh-server:ssh localhost

安装SSH-server:  sudo apt-get install openssh-server

启动SSH-Server:  sudo /etc/init.d/ssh start

重启SSH-Server:  sudo /etc/init.d/ssh restart

ssh-server configuration file:  /etc/ssh/sshd_config

ssh-client configuration file:  /etc/ssh/ssh_config

 

安装完毕后,就可以在windows系统中利用putty、SecureCRT等工具登录ubuntu系统;在linux系统中通过ssh命令登录该系统。

  

 


 

root@yu28:~# apt-get install openssh-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
有一些软件包无法被安装。如果您用的是不稳定(unstable)发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们还在新到(incoming)目录中。

 

 

 

您仅要求对单一软件包进行操作,这极有可能是因为该软件包安装不上,同时,
您最好提交一个针对这个软件包的故障报告。
下列的信息可能会对解决问题有所帮助:

下列的软件包有不能满足的依赖关系:
  openssh-server: 依赖: openssh-client (= 1:4.7p1-8ubuntu1.2) 但是 1:5.1p1-3ubuntu1 正要被安装
E: 无法安装的软件包
root@yu28:~# apt-get install openssh-client
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
openssh-client 已经是最新的版本了。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件未被升级。
root@yu28:/home/yuzubo# apt-get install openssh-client
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
openssh-client 已经是最新的版本了。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件未被升级。
root@yu28:/home/yuzubo# cd /etc/init
init.d/          initramfs-tools/
root@yu28:/home/yuzubo# cd /etc/init.d/
root@yu28:/etc/init.d# apt-get install openssh-server openssh-client
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
openssh-client 已经是最新的版本了。
有一些软件包无法被安装。如果您用的是不稳定(unstable)发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们还在新到(incoming)目录中。
下列的信息可能会对解决问题有所帮助:

下列的软件包有不能满足的依赖关系:
  openssh-server: 依赖: openssh-client (= 1:4.7p1-8ubuntu1.2) 但是 1:5.1p1-3ubuntu1 正要被安装
E: 无法安装的软件包
root@yu28:/etc/init.d# apt-get remove openssh-client
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列软件包将被【卸载】:
  openssh-client ssh-askpass-gnome ubuntu-desktop
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 3 个软件包,有 6 个软件未被升级。
解压缩后将会空出 2191kB 的空间。
您希望继续执行吗?[Y/n]y
(正在读取数据库 ... 系统当前总共安装有 99911 个文件和目录。)
正在删除 ubuntu-desktop ...
正在删除 ssh-askpass-gnome ...
正在删除 openssh-client ...
正在处理用于 man-db 的触发器...
root@yu28:/etc/init.d# apt-get install openssh-server openssh-client
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
将会安装下列额外的软件包:
  openssh-blacklist
建议安装的软件包:
  keychain libpam-ssh ssh-askpass molly-guard rssh
下列【新】软件包将被安装:
  openssh-blacklist openssh-client openssh-server
共升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 6 个软件未被升级。
需要下载 3099kB 的软件包。
解压缩后会消耗掉 6689kB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1
http://ubuntu.cn99.com hardy-security/main openssh-client 1:4.7p1-8ubuntu1.2 [720kB]
获取:2
http://ubuntu.cn99.com hardy-security/main openssh-blacklist 0.1-1ubuntu0.8.04.1 [2124kB]
获取:3
http://ubuntu.cn99.com hardy-security/main openssh-server 1:4.7p1-8ubuntu1.2 [254kB]
下载 3099kB,耗时 26s (115kB/s)                                               
正在预设定软件包 ...
选中了曾被取消选择的软件包 openssh-client。
(正在读取数据库 ... 系统当前总共安装有 99859 个文件和目录。)
正在解压缩 openssh-client (从 .../openssh-client_1%3a4.7p1-8ubuntu1.2_i386.deb) ...
选中了曾被取消选择的软件包 openssh-blacklist。
正在解压缩 openssh-blacklist (从 .../openssh-blacklist_0.1-1ubuntu0.8.04.1_all.deb) ...
选中了曾被取消选择的软件包 openssh-server。
正在解压缩 openssh-server (从 .../openssh-server_1%3a4.7p1-8ubuntu1.2_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 openssh-client (1:4.7p1-8ubuntu1.2) ...
正在安装新版本的配置文件 /etc/ssh/moduli ...

正在设置 openssh-blacklist (0.1-1ubuntu0.8.04.1) ...
正在设置 openssh-server (1:4.7p1-8ubuntu1.2) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Restarting OpenBSD Secure Shell server sshd                           [ OK ]

root@yu28:/etc/init.d# ps -e | grep ssh
 6417 ?        00:00:00 sshd

root@yu28:/etc/ssh# ssh 192.168.18.27
The authenticity of host '192.168.18.27 (192.168.18.27)' can't be established.
RSA key fingerprint is 84:9d:83:25:f3:10:af:e8:64:f2:5a:a1:ad:6e:3a:5d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.18.27' (RSA) to the list of known hosts.
root@192.168.18.27's password:
Last login: Mon Jul 27 23:31:26 2009 from yu20
Linux yu27 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@yu27:~#
root@yu27:~# ls
Desktop  Documents  Music  Pictures  Public  Templates  Videos
root@yu27:~# logout
Connection to 192.168.18.27 closed.
root@yu28:/etc/init.d