• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ssh server for Windows laptop?

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello sorry to be asking a nooby question. i did research but still confused.

anyhow i am try to set up my at home laptop so it can be accessed by ssh. so lets say at work i want to ssh into my laptop.

wondering why i am able to ssh onto servers at school and my at work desktop which has fqdn.

but why not on my laptop? my laptop is windows.

in order to ssh would i always need to download/set up an ssh server like cygwin? or is there a way to do it without downloading anything.

reason i ask is because when i set up my at work desktop i was able to ssh onto it without setting up anything or downloading anything other than giving it a host name and configuring lamp
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and sorry for grammar. my phone has issues on the other tabs :/
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm almost certain that Windows does not come with an SSH server preinstalled, so you will need to install something.

But is SSH really what you want? I'd think Remote Desktop would make more sense, for which non-Windows clients are available (http://www.rdesktop.org/, https://en.wikipedia.org/wiki/Tsclient).

Since you mentioned this was your home computer, have you already solved the problem how to connect to it? Obviously it needs to be up and running, and connected to the internet, but there are also issues such as dynamic IP addresses and providers that block inbound traffic for home users.
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thank you very much for the reply

Yes, my laptop is connected to the internet using wifi.

So, is SSH something that is standard with linux? So, if I were to install ubuntu on my laptop, ill be able to ssh into it by default?
and in order to ssh into my windows computer, it would need to have a static IP address correct and a software like cygwin?

I would like to be able to do both, ssh and rdesktop. I am just doing for practice and knowledge. I am a systems admin specialist(student position) at my university, but I am just trying to learn how to set these up on any computer and trying to understand why I am able to ssh onto my linux desktop computer, which I configured LAMP on. It is just all for knowledge

Thank you so much guys! I really owe it to you guys who helped me on this forum. Got me where I am now =P
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bump. Some information please =)

Trying to understand the concept of SSH. If it is something that is standard with Linux environments but not windows? And for windows we need a software like cygwin, correct?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SSH gives you a CLI environment. That's something you can do a lot with in Unix-ish OSes, but somewhat less useful on Windows. Depends on what exactly you intend to do from remote, obviously.

Something like cygwin (or unxutils, the first thing I install on all Windows machines I work on) makes the Windows CLI experience more bearable, but if you're a GUI kind of guy that's not going to help you a lot. Not sure if cygwin comes with an ssh server, but if it doesn't, it's probably not hard to add. I'd still recommend setting up Remote Desktop, though, that's how Windows is meant to work.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

william chaple wrote:
So, is SSH something that is standard with linux? So, if I were to install ubuntu on my laptop, ill be able to ssh into it by default?
and in order to ssh into my windows computer, it would need to have a static IP address correct and a software like cygwin?



Yes, you would need a static address. Or have your laptop registered with some name server, that can enable your clients to follow you.

Also, you need an accessible IP address. If for example, you are accessing across the internet, then you would need to have a public IP address -- or have the ports forwarded from a machine with a public address.

Cygwin does bring in a unix environment, but ... you also need to install the sshd, and set it up too (never done this, so can't help with this one).

Henry
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys well I actually did it! got the ssh and I can access it outside my network, but I am a little confused about certain things (concept wise)

Ok lets say my public IP address is 99.222.222.11 and on my router I port forward to 192.168.1.10, which is my linux computers.
question, when I ssh into 99.222.222.11, how does it know it is my computer? There are over 1000000000 devices, I am sure with the same IP address, no?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IP addresses are unique to devices (unique to network interfaces, actually) - which means that address is assigned to you only.
 
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done on getting ssh access working.

Now, with regards to your other thread where you are trying to access your web site you are now just a stones throw away. In order to get ssh access working you would have had to forward port 22 to your linux machine. So to get web access working you would have to forward port 80, or 8080 if you're running a servlet container such as tomcat.

But, and I think Ulf mentioned this to you somewhere too, you wouldn't want to run this as a permanent solution as you're opening up your home network to attackers.
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Cooke wrote:Well done on getting ssh access working.

Now, with regards to your other thread where you are trying to access your web site you are now just a stones throw away. In order to get ssh access working you would have had to forward port 22 to your linux machine. So to get web access working you would have to forward port 80, or 8080 if you're running a servlet container such as tomcat.

But, and I think Ulf mentioned this to you somewhere too, you wouldn't want to run this as a permanent solution as you're opening up your home network to attackers.



no definitely not! I am going take it off of course as soon as I set this up; well, I guess network security would be next subject =D

ANyhow, I am curious how it knows to go to my computer? isnt there a bunch of ip addresses the same way? lets my IP is 222.222.22.212; I mean if I ssh willchap001@222.222.22.212, doesnt loads of other people have that same IP address?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

william chaple wrote:I mean if I ssh willchap001@222.222.22.212, doesnt loads of other people have that same IP address?



No. At any one time, there is only one interface with that public IP address on the 'net. Note that this address is usually assigned to your router. Your wifi is actually its own subnet and not addressable from the public network. Thanks to network address translation, every device on your local subnet appears to have the same public IP address. Of course, this means that your devices are not publicly available. Tim mentions port forwarding. Forwarding is how you tell your router(s) where to send packets sent to your public IP address, so you would configure any packet hitting port 22 to some other IP address on your private subnet.
I will also reinforce the security warnings in this thread. Lock down your SSH server BEFORE you route public traffic to it. If you open up an unsecure SSH server to the 'net it will be exploited. Quickly. See this article for a good starting point for locking down SSH.
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool! I was reading about networking subject, and I see why now! Great stuff out there.!

Ok, well I am stuck on the second part before I step into webserver.

I am trying to ssh out of my network to a 2nd linux computer. Since I already have port 22 used up by compA, I need to use another port for compB. For compB, I used port 2222 and I added to my router to forward it to 192.168.1.7, Port 2222, which is compB. I also edited my /etc/ssh/sshd_conf file and added Port 2222 as well to the file.

when I try to ssh from outside my network "compB@xxx.xxx.xx.xx -p 2222" I get connection refused, or connection timed out. Is there something I am missing? I can connect to compA no problem outside my network, but now I added compB and trying to use port 2222, I guess this is a different matter now =(
 
Tim Cooke
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There will be no need to do any special conf on compB apart from start sshd on it. Configure your router to forward port 2222 on to port 22 on compB. So from the outside you'll access them like so:

ssh into compA

ssh into compB
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the part that confuses me

Configure your router to forward port 2222 on to port 22 on compB



does that means put 2222 on start then end on 22?

my router has this format (picture attached)
Capture.PNG
[Thumbnail for Capture.PNG]
 
Tim Cooke
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start and End port defines a range. So you can configure it to forward requests on any port between x and y to be forwarded on to endpoint z. Which is not what we want here.

I'm going to assume from your screenshot that your router does not support the forwarding of ports to different ports. So you can only map a -> a, not a -> b. This complicates things a bit as now you will have to configure your machine at 192.168.1.7 be listening on port 2222 for ssh requests. Two ways I know of that you can do this. The first is to configure sshd to listen on port 2222 rather than the default 22. Or configure Linux to forward requests on port 2222 to port 22 internally. The latter option of getting Linux to internally map the port is probably preferable but I'm not 100% on how to do it.
 
william chaple
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
=( oh no. Should I get another modem / router

Well this is what I have in my options (picture attached)

so my exact thing I should focus on, when it comes to researching should be find a way to configure sshd or configure linux to forward requests on port 2222 to 22?

or do you think port triggering would do the trick?
Capture.PNG
[Thumbnail for Capture.PNG]
 
Tim Cooke
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That looks very similar to the menu I had in an old Netgear 834G router I had (actually still have in a box somewhere). I remember that it didn't give you that much config over the port forwarding, which was annoying.

However, it's just occurred to me that you don't need to do any of this. You don't need a direct ssh route to your second machine. Just ssh into the one, then hop over to the second one internally from there. Easy!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic