Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ssh frustrations

  1. Sep 25, 2007 #1
    I recently learned about accessing computers remotely using ssh. I have been having some fun with this connecting my mac with my gf's mac.
    I tried doing to same thing with a machine I had running Windows XP, but there were some goofy firewall settings that I couldn't get rid of for the life of me. So I installed Debian on the machine instead. I am completely new to Linux. I had a feeling that this might be easier with Linux than Windows, but I still can't make an ssh connection to my computer (both directions mac to Debian and Debian to mac don't work).
    I am not sure what the problem is since I can connect my macs together without any trouble. Any ideas? Are there some settings I need to change on my Linux machine to make it accept ssh connections? I have a feeling this whole process is sensitive to how my machines are connected to the network. For instance, when both the macs are connected to the same university wireless network, I can connect. If I am connected through a router and the other mac is connected to the university wireless, I can't. If we are both connected through the same router, we can connect. My PC doesn't have a wireless card, so it connects directly to the wall.
    Any help would be greatly appreciated!!!
  2. jcsd
  3. Oct 6, 2007 #2
    in linux type as root user

    /etc/init.d/sshd start

    On debian root might be dissabled and you will have to do the following equivilant

    sudo /etc/init.d/sshd start
    [enter password]

    then try connecting. If that doesn't exist use your package manager and install OpenSSH server.
  4. Oct 8, 2007 #3
    I didn't have sshd installed. I installed it and I was able to connect. The new problem is I can't seem to load any files. I get an error message about loading the graphics, something about X11, maybe something having to do with "port forwarding". I would give you the exact error message but I can't seem to get in anymore. When I try to start sshd, it tells me it can't load the host key /etc/ssh/ssh_host_key_rsa. BTW, my sshd file seems to be located in /usr/sbin. Also when I give the command /usr/sbin/sshd start, it tells me there are too many arguments. Don't know what that's all about. Any ideas?
    Out of curiosity, is "starting sshd" equivalent to "opening port 22"?
    Last edited: Oct 8, 2007
  5. Oct 9, 2007 #4
    don't do ("usr/sbin/sshd start") that alway's start sshd by

    /etc/init.d/sshd {start | stop | restart }

    it will take care of the key's and all that for you

    what you are looking for is X11 tunelling try

    ssh -Y login@place
    the -Y should do the trick but maby you should use another text editor such as vim, or emacs. if the network is slow you might want to download the files to your local computer and edit them like that and then send them back over the network.

    In the latter case you can use gftp which will connect through ssh and allow you to transfer files fairly easily using its GUI, where then you can edit and send them back.
  6. Oct 18, 2007 #5
    In general, when somebody says "open port 22" they mean allow traffic on that port in a firewall. sshd is a piece of software which runs in the background handling ssh connections to port 22 which is the port ssh utilizes.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook