Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    ssh usage

    Reply
    Page 1 of 2 | 1   2   | Next
    iliaden | # 1 | 2008-04-24, 21:39 | Report

    hi,

    I am lost, and beg you for help!

    on my n800, I have installed ssh (client), and on the desktop (windows 2000, cygwin), ssh server. The server works perfectly, and I was able to connect to it via another computer on my network.

    the question is: how to connect to my desktop via ssh? I have no wireless router (living off my neighbor's connection... don't tell them!), so the network I am on and the one i'm trying to connect to are different. How do I do this?

    thank you

    Ilia

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ace | # 2 | 2008-04-24, 21:58 | Report

    You'll have to go over the internet, so your wired router will need to forward the ssh port to your desktop.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    iliaden | # 3 | 2008-04-24, 22:06 | Report

    request for aditional clarification:
    1-WHICH port???
    2- from the n800, i enter
    $ssh -X login@???
    I have a program that sends my IP to a server every 5 minutes, thus giving me a static address. do i enter
    $ssh -X login@my.external.ip.?
    ex: currently: 216.221.38.161

    if that's it, then what port should I enter (after having opened it on my firewall)?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ace | # 4 | 2008-04-24, 22:33 | Report

    Default ssh port is 22.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to ace For This Useful Post:
    iliaden

     
    jldiaz | # 5 | 2008-04-24, 22:56 | Report

    Originally Posted by iliaden View Post
    on my n800, I have installed ssh (client), and on the desktop (windows 2000, cygwin), ssh server. The server works perfectly, and I was able to connect to it via another computer on my network.

    This "other computer on your network" is wired to your W2000? It is a local network? Did you use an internal IP to connect?

    Originally Posted by iliaden View Post
    the question is: how to connect to my desktop via ssh? I have no wireless router (living off my neighbor's connection... don't tell them!), so the network I am on and the one i'm trying to connect to are different. How do I do this?
    You need to provide your external IP to the ssh client. YOu can find this IP in your W2000 box by typing the command ifconfig in a cmd window. If the IP you obtain is not what you expected, (i.e, you get another internal IP), then probably your router has the "true" external IP,and you have to setup your router to forward the port 22 to your W2000 machine.

    You dont need to specify any port in the ssh client command line, as long as your ssh server uses the standar port (which is 22, as said).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    iliaden | # 6 | 2008-04-24, 22:59 | Report

    thanks... although ace gave me the answer I needed.
    All I was missing was the port number, so when trying to connect, it was closed.
    I have a small program that gives me a static ip (see www.no-ip.com). therefore, I always connect to user@staticIP.com

    the W2k is the machine i tried (and finally did!) connect to. It has cygwin to allow this.

    Ilia

    Edit | Forward | Quote | Quick Reply | Thanks

     
    iliaden | # 7 | 2008-04-24, 23:03 | Report

    although I have another question:
    now that I have ssh connection working, is there any way to make two computers work together.

    I'll be more specific: I need to send a file from the host (w2k) to the client (n800). Can I use cp? if so, what would it be?
    $ cp /cygdrive/*/folder/file.ext /???
    where do I copy it?

    thank you.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    desiv | # 8 | 2008-04-24, 23:12 | Report

    Originally Posted by iliaden View Post
    I'll be more specific: I need to send a file from the host (w2k) to the client (n800). Can I use cp? if so, what would it be?
    $ cp /cygdrive/*/folder/file.ext /???
    where do I copy it?

    thank you.
    You don't send to file from the host to the n800.
    You get the file using your n800.

    So, you'd use something like (from the n800 shell):
    scp user@my.external.ip:/path/to/file ./

    Or you can use sftp....

    desiv

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to desiv For This Useful Post:
    iliaden

     
    jldiaz | # 9 | 2008-04-24, 23:15 | Report

    Originally Posted by iliaden View Post
    I'll be more specific: I need to send a file from the host (w2k) to the client (n800). Can I use cp? if so, what would it be?
    $ cp /cygdrive/*/folder/file.ext /???
    where do I copy it?
    The required command is scp, to be issued in the tablet. It does not require the ssh session previously stablished. scp works similar to cp, only one of the files (source or destination) is located in another machine. You have to prefix that file with the name (or IP) of the machine, ended by a colon. You have to specify also the remote user if it is different from the local user.

    To be more specific, the following command (issued in an xterm session in the tablet)
    Code:
    $ scp MyTabletFile foo@bar:folder
    will stablish a ssh session with the machine bar, user foo, and copy the file MyTabletFile over this encrypted connection, leaving that file in the folder "folder" of the remote machine. This is a folder relative to the home of the user "foo" in that machine.

    The command also works in the oppsite direction (but always issued from the tablet):

    Code:
    $ scp foo@bar:folder/file.ext .
    This command will stablish a ssh session with machine bar, user foo, and copy the file ~/folder/file.ext (relative to the $HOME of the user foo in bar) to the local machine (the tablet), leaving it in the current directory (that is what means the final period).

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to jldiaz For This Useful Post:
    iliaden

     
    Benson | # 10 | 2008-04-24, 23:20 | Report

    You can use sftp or scp.

    From wikipedia:

    Copying file to host:
    Code:
    scp SourceFile.ext user@host:directory/TargetFile.ext
    Copying file from host:
    Code:
    scp user@host:folder/SourceFile.ext TargetFile.ext
    But I generally use sftp, which handles much like ftp.

    Heh, beaten.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Benson; 2008-04-24 at 23:28. Reason: I am beaten!
    The Following User Says Thank You to Benson For This Useful Post:
    jldiaz

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout