Active Topics

 


Reply
Thread Tools
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#1
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
 
ace's Avatar
Posts: 296 | Thanked: 80 times | Joined on Dec 2007
#2
You'll have to go over the internet, so your wired router will need to forward the ssh port to your desktop.
 
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#3
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)?
 
ace's Avatar
Posts: 296 | Thanked: 80 times | Joined on Dec 2007
#4
Default ssh port is 22.
 

The Following User Says Thank You to ace For This Useful Post:
jldiaz's Avatar
Posts: 48 | Thanked: 40 times | Joined on Apr 2008 @ Spain
#5
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).
__________________
--ル Diaz
 
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#6
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
 
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#7
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.
 
Posts: 225 | Thanked: 59 times | Joined on Jul 2007
#8
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
 

The Following User Says Thank You to desiv For This Useful Post:
jldiaz's Avatar
Posts: 48 | Thanked: 40 times | Joined on Apr 2008 @ Spain
#9
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).
__________________
--ル Diaz
 

The Following User Says Thank You to jldiaz For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#10
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.

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:
Reply


 
Forum Jump


All times are GMT. The time now is 15:08.