互联网 SSH 访问
From DD-WRT Wiki
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="External SSH,Web Interface" />
<link rel="shortcut icon" href="/favicon.ico" /> <link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch_desc.php" title="DD-WRT Wiki (English)" /> <link title="Creative Commons" type="application/rdf+xml" href="/wiki/index.php?title=External_SSH&action=creativecommons" rel="meta" /> <link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html" />
<title>External SSH - DD-WRT Wiki</title> <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/wiki/skins/sgumax/gumax_main.css?63"; /*]]>*/</style> <link rel="stylesheet" type="text/css" media="print" href="/wiki/skins/common/commonPrint.css?63" /> <link rel="stylesheet" type="text/css" media="handheld" href="/wiki/skins/sgumax/handheld.css?63" /> <script type= "text/javascript">/*<![CDATA[*/
var skin = "sgumax"; var stylepath = "/wiki/skins"; var wgArticlePath = "/wiki/index.php/$1"; var wgScriptPath = "/wiki"; var wgServer = "http://www.dd-wrt.com"; var wgCanonicalNamespace = ""; var wgCanonicalSpecialPageName = false; var wgNamespaceNumber = 0; var wgPageName = "External_SSH"; var wgTitle = "External SSH"; var wgAction = "view"; var wgArticleId = "1038"; var wgIsArticle = true; var wgUserName = "Amoroso1860"; var wgUserGroups = ["*", "user", "autoconfirmed"]; var wgUserLanguage = "en"; var wgContentLanguage = "en"; var wgBreakFrames = false; var wgCurRevisionId = "31674"; /*]]>*/</script>
<script type="text/javascript" src="/wiki/skins/common/wikibits.js?63"></script> <script type="text/javascript" src="/wiki/index.php?title=-&action=raw&smaxage=0&gen=js"></script> <style type="text/css">/*<![CDATA[*/
@import "/wiki/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; @import "/wiki/index.php?title=MediaWiki:Sgumax.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000"; @import "/wiki/index.php?title=-&action=raw&gen=css&maxage=18000&smaxage=0"; /*]]>*/</style>
<script type="text/javascript" src="/wiki/skins/common/ajax.js?63"></script>
<script type="text/javascript" src="/wiki/skins/common/ajaxsearch.js?63"></script> <script type="text/javascript">hookEvent("load", sajax_onload);</script> </head>
<body class="mediawiki ns-0 ltr page-External_SSH">
<a name="top" id="contentTop"></a>
<a style="background-image: url(http://www.dd-wrt.com/wiki/DD_WRT_black.jpg);" href="/wiki/index.php/Main_Page" title="Main Page"></a>
- <a href="/wiki/index.php/User:Amoroso1860" class="new">Amoroso1860</a> |
- <a href="/wiki/index.php/User_talk:Amoroso1860" class="new">My talk</a> |
- <a href="/wiki/index.php/Special:Preferences">My preferences</a> |
- <a href="/wiki/index.php/Special:Watchlist">My watchlist</a> |
- <a href="/wiki/index.php/Special:Contributions/Amoroso1860">My contributions</a> |
- <a href="/wiki/index.php?title=Special:Userlogout&returnto=External_SSH">Log out</a>
<input id="searchInput" name="search" type="text" accesskey="f" value="" /> <input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" />
<a name="top" id="top"></a>
External SSH
From DD-WRT Wiki
SSH access from Internet
|
[<a href="/wiki/index.php?title=External_SSH&action=edit§ion=1" title="Edit section: Ensure SSH Enabled">edit</a>] Ensure SSH Enabled
- Goto the Services tab and the Services sub-tab on the <a href="/wiki/index.php/Web_Interface" title="Web Interface">Web Interface</a>
- Enable "SSHd" is under the section titled "Secure Shell"
- 'SSH TCP Forwarding' does not need to be enabled if you just want to connect from the outside to your LAN.
- Choose an appropriate port (The default is 22, but it is recommended that you change it to a non-standard port above 1024 for security reasons. Remember the port number, as you will need to enter it into your SSH client in order to connect to the router)
- You can activate (less secure) password authorization and/or (recommended) private/public key authorization. More information about generating the keys can be found here: [<a href="http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line#Setting_Up" class="external autonumber" title="http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line#Setting_Up" rel="nofollow">[1]</a>].
- Save
[<a href="/wiki/index.php?title=External_SSH&action=edit§ion=2" title="Edit section: Enable Remote Access">edit</a>] Enable Remote Access
- Goto the Administration tab and the Management sub-tab on the <a href="/wiki/index.php/Web_Interface" title="Web Interface">Web Interface</a>
- Enable "SSH Management" under the section titled "Remote Access"
- Enter the same port number as specified under (4) above. This opens the port in the firewall.
- Save
- 重新启动路由器
Now you will be able to connect to your router's WAN IP from the internet using an SSH client such as <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" class="external text" title="http://www.chiark.greenend.org.uk/~sgtatham/putty/" rel="nofollow">PuTTY</a>.
<a name="Disabling_Remote_Access"></a>[<a href="/wiki/index.php?title=External_SSH&action=edit§ion=3" title="Edit section: Disabling Remote Access">edit</a>] Disabling Remote Access
If at any time you wish to disable SSH access from the WAN,
- Goto the Administration tab and the Management sub-tab on the <a href="/wiki/index.php/Web_Interface" title="Web Interface">Web Interface</a>
- Disable "SSH Management" under the section titled "Remote Access"
- Apply Settings
[<a href="/wiki/index.php?title=External_SSH&action=edit§ion=4" title="Edit section: SSH Password">edit</a>] SSH Password
- When asked for the username, enter root (even if you changed username in web interface)
- When asked for the password, enter your router's password
[<a href="/wiki/index.php?title=External_SSH&action=edit§ion=5" title="Edit section: References">edit</a>] References
- <a href="http://hetos.de/sshtut.html" class="external free" title="http://hetos.de/sshtut.html" rel="nofollow">http://hetos.de/sshtut.html</a>
<a href="/wiki/index.php/Special:Categories" title="Special:Categories">Categories</a>: <a href="/wiki/index.php/Category:SSH" title="Category:SSH">SSH</a> | <a href="/wiki/index.php/Category:Basic_tutorials" title="Category:Basic tutorials">Basic tutorials</a>
<script type="text/javascript"> var winheight = parseInt(document.documentElement.clientHeight) var boheight = parseInt(document.body.scrollHeight) if(winheight <= boheight) {document.write('
} </script>
- <a href="/wiki/index.php/External_SSH">Article</a> |
- <a href="/wiki/index.php/Talk:External_SSH">Discussion</a> |
- <a href="/wiki/index.php?title=External_SSH&action=edit">Edit</a> |
- <a href="/wiki/index.php?title=External_SSH&action=history">History</a> |
- <a href="/wiki/index.php/Special:Movepage/External_SSH">Move</a> |
- <a href="/wiki/index.php?title=External_SSH&action=watch">Watch</a>
</body></html>