# 虚拟机下Putty如何连接BT5

**URL:** <https://forum.90sec.com/t/topic/3619>\
**Category:** 技术文章\
**Created:** [2012 年5 月 29 日 09:35 UTC](https://forum.90sec.com/t/topic/3619 "2012-05-29T09:35:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![1176750642](https://forum.90sec.com/letter_avatar_proxy/v4/letter/1/ed655f/32.png) [@1176750642](https://forum.90sec.com/u/1176750642)\
发布日期： [2012 年5 月 29 日 09:35 UTC](https://forum.90sec.com/t/topic/3619/1 "2012-05-29T09:35:18Z")

</div>

今天没事想做个SSH后门 就用PUTTY连接下 死活连接不上  
找了一些资料  
BT5下和其他的LINUX系统设置是不一样的  
先看是否二边能PING通 『不能ping的话先设置下网卡 推荐用桥接比较好』  
然后看是否开启SSH

sudo apt-get install openssh-server

确认sshserver是否启动了

ps -e |grep ssh

ssh-server配置文件在/ etc/ssh/sshd\_config 默认是22 可以自行修改下 然后在 restart 重启下SSH

最后如果还不行的话

运行 root@bt:/etc/ssh# sshd-generate

会有下面的图  
Generating public/private rsa1 key pair.  
Your identification has been saved in /etc/ssh/ssh\_host\_key.  
Your public key has been saved in /etc/ssh/ssh\_host\_key.pub.  
The key fingerprint is:  
bb:bf:d2:e2:28:83:67:ca:03:df:41:da:3b:d4:92:ff root@bt  
The key's randomart image is:  
+--[RSA1 2048]----+  
| |  
| |  
| |  
| . |  
| + o S |  
|. . \* . . |  
| o + = .. |  
| .+ O ..o.. |  
| o= +.oE+o. |  
+-----------------+  
Generating public/private rsa key pair.  
Your identification has been saved in /etc/ssh/ssh\_host\_rsa\_key.  
Your public key has been saved in /etc/ssh/ssh\_host\_rsa\_key.pub.  
The key fingerprint is:  
d3:51:79:db:3e:d8:ea:2f:53:db:65:0d:db:c6:58:e6 root@bt  
The key's randomart image is:  
+--[RSA 2048]----+  
| .. |  
| .. . |  
| . . o |  
| . . o +|  
| S . o@.|  
| . .o+E|  
| oo=|  
| + ..|  
| ..+. |  
+-----------------+  
Generating public/private dsa key pair.  
Your identification has been saved in /etc/ssh/ssh\_host\_dsa\_key.  
Your public key has been saved in /etc/ssh/ssh\_host\_dsa\_key.pub.  
The key fingerprint is:  
f3:0d:35:cc:7b:0a:45:83:43:d1:e3:44:78:70:b5:de root@bt  
The key's randomart image is:  
+--[DSA 1024]----+  
| .+B=.. |  
| +==. . |  
| =\*.. |  
| o.+ . |  
| S o . o E|  
| o + o |  
| . o |  
| |  
| |  
+-----------------+

最后在重新开启 SSH /etc/init.d/ssh start

就OK了  
[1.png](https://forum.90sec.com/discuz-migration/attachments/d0f5596f627f661b843f2f7baef4617637920581e73833047696edd8f821f751)  
[2.png](https://forum.90sec.com/discuz-migration/attachments/440217abb7bb029f90619635cb2dff4a860130b842a5266f473f9029ce8f5daf)
