[96] SSH 連接錯誤訊息

資管系大二下學期選修課程
授課教授:XO

版主: b80203, ghost3401, XO, maa, kelly19881227

分享到: Facebook

[96] SSH 連接錯誤訊息

文章amemo » 週一 4月 28, 2008 11:39 pm

我已經在virtual box 設定好了port22給SSH用
但是 連接的時候
總是顯示
圖檔


雖然我想有可能是iptables的問題
想編輯/etc/init.d/rc.local的內容
但是卻是空的
附加檔案
ssh-error.GIF
(14.75 KiB) 被下載 2 次
amemo
問題很多的小學生
 
文章: 23
註冊時間: 週二 9月 05, 2006 7:08 pm

Re:[問題]SSH 連接錯誤訊息

文章h0075200 » 週二 4月 29, 2008 11:22 am

我已經在virtual box 設定好了port22給SSH用
但是 連接的時候
總是顯示
恕圖刪

請問你VM的網路設定是用NAT mode嗎?
如果是用NAT的話 還要用port forwarding喔!!
可以在版上找找,之前有PO過~~
Life is for something rather than die for nothing
頭像
h0075200
懷疑的國中生
 
文章: 52
註冊時間: 週一 10月 23, 2006 1:19 pm
來自: 圖資系

Re: [問題]SSH 連接錯誤訊息

文章XO » 週二 4月 29, 2008 12:20 pm

amemo 寫:我已經在virtual box 設定好了port22給SSH用
但是 連接的時候
總是顯示

(圖恕刪...)

雖然我想有可能是iptables的問題
想編輯/etc/init.d/rc.local的內容
但是卻是空的


再跑一次 b2d-setup 就會把那個腳本重新產生出來。
不過 b2d-setup 可是要從頭來過,定義 Host 名稱、Domain name、IP、Netmask、Gateway、DNS 及各服務伺服器的統一
密碼,這些你都得先備妥。就如樓上所說,如果你是用 NAT 則必須先關閉 B2D Server 這虛擬機,回到 VirtualBox 再以下指令
的方式,去設定 Port forwarding。

此外基於安全考量 iptables 裡,把 port 22 規劃成同一網段的機器才可以抓... 這需要編輯 /etc/init.d/rc.local 內容... 例如:

代碼: 選擇全部
# 只有本主機所屬網段才能連到這台主機的 ssh port 22
$IPTABLES -A INPUT -p tcp -s 140.136.155.0/24 --dport 22 -j ACCEPT
$IPTABLES -A INPUT -p tcp -s 127.0.0.1 --dport 22 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 22 -j DROP


這個例子只允許 140.136.155.0 這個網段與 127.0.0.1 本機可以來使用 (ACCEPT ㄇㄟ),其餘連上門來的一概來個 DROP。
假如你在家 IP 分享器分配的是 192.168.1.0 這網段的動態 IP 的話,就可以如法泡製,只要加在前此所提 iptable 設定這一行
代碼: 選擇全部
$IPTABLES -A INPUT -p tcp --dport 22 -j DROP

的前面 ... 加上下面這麼一行

代碼: 選擇全部
$IPTABLES -A INPUT -p tcp -s 192.168.1.0/24 --dport 22 -j ACCEPT


-p 是指「Protocol」; -s 是指 Source IP; --dport 是「Destination Port」,意思是指「欲造訪的埠」; -j 是指「Job」。
連起來看... 是在說...來自 192.168.1.xxx 的 TCP 連線需求,如果要連 Port 22 的話,就接受他的請求吧!

如果嫌這堆 iptable 的防火牆設定 礙著學習了,跑完 b2d-setup 產生此檔後,進入編輯,把....

代碼: 選擇全部
###-----------------------------------------------------###
# 設定 filter table 的預設政策
###-----------------------------------------------------###
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT


這幾行後面的所有其他設定全不把他們註解掉 或是 全部 砍掉.....

顧名思義 INPUT (進來的) OUTPUT (出去的) FORWARD (代轉的過客 -- B2D 拿來 扮 Router 時就有這角色) 一概接受ㄇㄟ。
eXtra Old 的是我「不是酒」哦!
제 이름은 오조휘 입니다

臉書裡依舊是 Extra.Old: http://www.facebook.com/extra.old
頭像
XO
資管系教師
 
文章: 5474
註冊時間: 週二 4月 27, 2004 12:20 pm
來自: CQ Inc.

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:16 pm

To activate office setup you need to visit how to activate office setup where you can find what all you can do on office setup. Are you interested in using office 365 products here we are providing full support to make your computer working with office. you dont need to work on anything as we will help you to setup your office product. visit how to activate microsoft office now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:16 pm

Download office.com/setup product key without putting any efforts. We are ready to give you complete help till the completion of the installation process. How to login to office.com/setup ? if you want to proper information about office.com/setup .Here is our website for your help so visit office.com/setup then you will find a right way to operate MS office.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:16 pm

office setup is the best software which is widely used in globe .It is a powerful service that helps you unleash your best ideas , get things done, and stay connected on the go.for more details visit: www.office.com/setup today. Setup office 365 package with us. We are the team of technical professionals and give the best technical help to our clients even after the installation process. visit download office setup 365 now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:17 pm

office.com/myaccount will help you to deploy the office setup successfully on your device. Here are easy steps to download, install and activate office setup. Visit office.com/myaccount now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:17 pm

Norton Security has been giving the best on-line security answers for ensuring the clients' contraptions other than as information against the web threats. to get more about norton click www.norton.com/setup now. Turn on real-time protection by going through the steps given for downloading, installing and activating norton product. Visit Norton.com/setup now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:17 pm

norton internet security is widely used antivirus provides the easiest to use and most intutive protection for your computer and your mobiles .install it and forget about viruses,spyware,root-kits, hackers.for more details visit: norton setup product key now. Norton is the most reliable antivirus and we are giving you the full support to get it installed in your laptops and computers - install norton setup with product key .
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:18 pm

Antivirus is the need of computers that makes them virus and we are going to give you full support to get the best antivirus installed in your computers and laptops. Download norton antivirus package with us - download norton setup . Download and introduce activate norton setup Sign In to Norton. On the off chance that you don't have a Norton account, click Create an Account and complete the sign up procedure. In the Get Started window, click Enter a New Product Key. To take a crack at Automatic Renewal Service for your Norton membership.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:18 pm

Antivirus is the need of computers that makes them virus and we are going to give you full support to get the best antivirus installed in your computers and laptops. Download norton antivirus package with us - install norton internet security today. Norton will prevent virus-infected emails and instant messages from spreading, so you can feel secure while you keep in touch. Lastly, Norton blocks browser exploits and protects against infected Web sites. Surf the Internet with confidence. visit norton.com/setup product key now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:18 pm

Webroot is very well known for its immense security from the spyware, viruses. In order to protect your system from the spyware or any other viruses,visit: www.webroot.com/safe today. Makes the web safe for your kids to explore and helps your kids balance their time spent .. Internet Security Plus with Antivirus Protection by..... webroot.com/safe .
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:19 pm

webroot cyber security is a ultimate internet security suite for complete protection against today's diverse range of threat on windows. key features are 100% secure secure shopping, 1 click virus scanning, malicious website filtering, unblock antivirus.if you want to install it then visit webroot product key now. It is all time best protective antivirus and anti-spyware .It is real time protection technology and it is safer , faster and more complete than ever before.if want to install it then visit webroot activation code now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:19 pm

Do you want to install webroot in your computer?? here we are proving you best support to get it installed in your computer. install webroot keycode now. Install the best antivirus in your computer with the best support team. we are providing webroot installation - webroot.com/safe keycode .
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:19 pm

Install webroot with premium help and best tech team and make your computer virus - download webroot with activation code . Download install webroot with activation code to remove virus from your computer with the best support team.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:19 pm

It is all time best protective antivirus and anti-spyware .It is real time protection technology and it is safer , faster and more complete than ever before.if want to install it then visit How to activate webroot safe our site. Install the best antivirus in your computer with the best support team. we are providing webroot installation - webroot activation with keycode now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:20 pm

Download www.mcafee.com/activate antivirus in your computer to get rid of all the dangerous viruses. mcafee antivirus is widely used aantivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge. for more details visit: mcafee.com/activate now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:20 pm

To activate hulu.com/activate on your device, either use the on-screen keyboard to enter your Hulu log in information or go to Hulu.com/activate and enter the device activation code. Either of these methods will allow you to use Hulu on any Hulu-supported device. Hulu streaming provides unlimited access to the entire Hulu streaming library at reasonable rate. Use Hulu Code Activation and watch live sports, news etc. visit enter activation code for hulu now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:20 pm

Hulu Plus is available for streaming on popular gaming consoles like PlayStation 3 (PS3), Xbox 360 and Roku, as well as on the computer. By downloading the Hulu Plus application and activating your account, you can stream television shows and movies from the Hulu site. visit hulu activation code now. Hulu supports a wide variety of devices that you can use to stream with us. You can activate any of them at any time, as well as remove them from your account. download www.hulu.com/activate activation code now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm

Re: [96] SSH 連接錯誤訊息

文章mahak » 週四 7月 16, 2020 7:21 pm

To activate Hulu Plus on your device, either use the on-screen keyboard to enter your Hulu log in information or go to how to activate hulu and enter the device activation code. Either of these methods will allow you to use Hulu on any Hulu-supported device. Hulu and Hulu Plus is a streaming service provider. It has many subscribers just because of it providing unlimited collection of entertainment channels. for more updates activate hulu.com/activate now.
mahak
繼續深造的研究生
 
文章: 437
註冊時間: 週五 6月 28, 2019 6:30 pm


回到 Web程式設計

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 3 位訪客

cron