Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Working With Remote Repositories Cloning

Fabrício Montenegro
Fabrício Montenegro
18,723 Points

How to connect from Windows to a Linux through SSH when both machines are connected to a router

Hey guys, I got to the cloning section of git and I wanna set a repository on my home desktop A (windows) and my notebook B (lubuntu - linux), in a way I can always have my projects up to date in both machines. Now, before I get to the git part, how can I access my linux notebook B from my windows desktop A through SSH (which git uses to clone repositories)? Here's what I've done so far:

  • assumed linux comes with a SSH server
  • downloaded a SSH client on A (I've tried PuTTY and SSH Secure Shell)
  • turned off the firewall on A
  • assigned a fixed IP to both machines in the DHCP section of my TP-LINK ( TL-WR740N) router config

And my knowledge ends here. I know the IP addresses are set right because ipconfig returns Ethernet IPv4 Address: 192.168.0.100 in A and ifconfig returns wlan0 inet addr: 192.168.0.101 in B. I also checked Open Port Check Tool and it can't see any ports in both A and B. Help, please.

1 Answer

Fabrício Montenegro
Fabrício Montenegro
18,723 Points

Ok. Apparently it was very dumb of me because linux doesn't come with a SSH server, it comes with a SSH client.

I installed a SSH server running sudo apt-get install openssh-server on my linux notebook and on the windows desktop downloading MobaSSH. Now everything is good to go.

Edit

MobaSSH sucks. Everytime I started windows the server wouldn't start and I needed to reinstall the entire thing.

Instead of that, I found a very detailed guide on some random Oracle documentation named Installing Cygwin and Starting the SSH Daemon that worked really well for me. Haven't had a problem since that.