TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to create a remote development environment?

5 点作者 MuEta超过 9 年前
I have a lot of laptops and desktops that I want to be able program from, and I have found using a repository like Github to be super frustrating. I have a couple of desktops that sit unused at my house that I could install Linux on to make as the development environment, but I have no idea how to make them accessible to the internet, so I can remote into them from anywhere.

4 条评论

0942v8653超过 9 年前
Once you have an SSH server installed, you will need to first disable password-based authentication (this is very important—even if you think you have a strong password, there are bots all over the internet just waiting for the chance).<p>Then set up port forwarding on your router. To do this, go to your router settings and:<p>1. Set up a DHCP reservation for the server. This should be easy enough, but depending on your router you might have to look up the server&#x27;s MAC address and set it manually.<p>2. Set up a port forwarding connection from the router settings. The internal IP should be the one you just reserved, port 22, and the external port should be pretty much anything but 22; I recommend choosing a random number from 10000 to 65535.<p>3. Now you can use it anywhere! Look up your public IP (<a href="https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=what+is+my+ip&amp;ia=answer" rel="nofollow">https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=what+is+my+ip&amp;ia=answer</a>) from your home network, and SSH into it like this:<p><pre><code> ssh &lt;username&gt;@&lt;public ip&gt; -p &lt;external port&gt; </code></pre> Last thing you need to do is set up the server with whatever stuff you want—gitlab or gogs for a github replacement, or anything really.<p>You can then access port 80 of the server securely with<p><pre><code> ssh &lt;username&gt;@&lt;public ip&gt; -p &lt;external port&gt; -L &lt;some port&gt;:localhost:80 </code></pre> and go to localhost:&lt;some port&gt;&#x2F; in your browser while that session is open. Don&#x27;t forward port 80 to another external port on your router because it will all go over the internet (not just your home network) in plain text.
评论 #10786287 未加载
leoalves超过 9 年前
<a href="https:&#x2F;&#x2F;burrow.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;burrow.io&#x2F;</a>
m1k3r420超过 9 年前
openssh-server will allow you to connect to the computers from anywhere. This will give you command line access, from there you can do anything.
atmosx超过 9 年前
Use docker.