Help - Search - Members - Calendar
Full Version: Sftp
OESF Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > C1000/3x00 General discussions
Smuffle
If I could access my Z from my Mac through SFTP it would make life a lot easier when moving and copying files around. I can do it the other way around but it's not ideal. Anyone got it working?

I have the Cacko ROM and it seems to have the functionility (could be wrong) but I'm darned if I can work out how.
Mjolinor
Can you SSH to it. If you can then you should be able to SFTP to it as well. The SSH daemon on Cacko works fine out of the box so I suspect your not doing the other end right. You have to have set the root password I think, maybe that is your problem.
Smuffle
QUOTE(Mjolinor @ Jan 10 2006, 02:47 AM)
Can you SSH to it. If you can then you should be able to SFTP to it as well. The SSH daemon on Cacko works fine out of the box so I suspect your not doing the other end right. You have to have set the root password I think, maybe that is your problem.
*


No, I can't SSH to it (I assume its ssh zaurus@ipaddress). Is the SSH server loaded by default?

As for the SU password, I was wondering why it never asked.. how do you set it?
bluedevils
CODE
ssh <zaurus ip> -l root

or
CODE
ssh <zaurus ip> -l zaurus


both passwords are the same as the numeric passcode that you might have set. If you have a stock setup then the program would be under your settings tab. I haven't tried to sftp to the zaurus so I cannot confirm its availability. I usually use scp.

CODE
scp <remote> <destination>

or more precisely to push a file to the zaurus from another machine
CODE
scp <path and filename> zaurus@<ip of zaurus>:<path to destination>
rickh
QUOTE(Smuffle @ Jan 9 2006, 06:33 PM)
No, I can't SSH to it (I assume its ssh zaurus@ipaddress).  Is the SSH server loaded by default? 

As for the SU password, I was wondering why it never asked.. how do you set it?
*

I've had my 3000 for awhile now, so I can't swear to it, but I don't believe ssh server/client/addons were installed by default. I installed openssh (you can get it from several different places, www.killefiz.de/zaurus is one place) myself.

R.
==
Mjolinor
open the console, that will be user zaurus

su root will get you to a root console without a password
you can then set a password using passwd.

I assume it's the same for the zaurus password before you su root that is.

ssh doesn't seem to like working without a password
Smuffle
QUOTE(bluedevils @ Jan 10 2006, 04:07 AM)
CODE
ssh <zaurus ip> -l root

or
CODE
ssh <zaurus ip> -l zaurus


both passwords are the same as the numeric passcode that you might have set.  If you have a stock setup then the program would be under your settings tab.  I haven't tried to sftp to the zaurus so I cannot confirm its availability.  I usually use scp.

CODE
scp <remote> <destination>

or more precisely to push a file to the zaurus from another machine
CODE
scp <path and filename> zaurus@<ip of zaurus>:<path to destination>

*



I could use scp but, call me old fashioned, nice to have a GUI of my file systems.

I set the password OK but not really sure what to do after that. My idea was that I type something like "sftp -startserver" and a background process starts up which would the let my desktop connect over port 22. Doesn't seem to be the case though.
Mjolinor
SFTP uses the ssh server so if tou have a root console open and type "ps x" then it should be in the list if it is loaded. If it isn't loaded then find it with

find / -name sshd

then change to the directory it is in and type

./sshd

That will run the SSH daemon

Once running go to a PC on the network, open a root console and type

ssh "IP address"

If that works then you will be able to open an sftp session using nautilus or any sftp software.
Smuffle
QUOTE(Mjolinor @ Jan 10 2006, 04:12 PM)
SFTP uses the ssh server so if tou have a root console open and type "ps x" then it should be in the list if it is loaded. If it isn't loaded then find it with

find / -name sshd

then change to the directory it is in and type

./sshd

That will run the SSH daemon

Once running go to a PC on the network, open a root console and type

ssh "IP address"

If that works then you will be able to open an sftp session using nautilus or any sftp software.
*


found the directory and did as you said; here was the message:
"sshd re-exec requires execution with an absolute path"

?
Mjolinor
OK so find the directory then run it with the absolute path ie

/"the path here"/sshd

Just copy what the find command brings back and paste it on the command line.
Smuffle
QUOTE(Mjolinor @ Jan 10 2006, 06:50 PM)
OK so find the directory then run it with the absolute path ie

/"the path here"/sshd

Just copy what the find command brings back and paste it on the command line.
*


Executes without complaining now but not sure if it's actually running.. still doesn't want to be connected to from my desktop ("connection refused").

I can't see anything similar to "SSH" in the "ps x" list either.

Any ideas?
bluedevils
most of the implementations of sshd on the zaurus (sharp based rom) use inetd to spawn sshd on demand. Check your inetd.conf to see if it is entered there or do a netstat -a and see if it is listening on port 22 (ssh).
Smuffle
QUOTE(bluedevils @ Jan 10 2006, 11:08 PM)
most of the implementations of sshd on the zaurus (sharp based rom) use inetd to spawn sshd on demand.  Check your inetd.conf to see if it is entered there or do a netstat -a and see if it is listening on port 22 (ssh).
*


Did netstat -a and it shows in the list at the top:

Active internet connections (servers and established)
blah blah
tcp 0 0 *:ssh *:*

Now at the lonely border of my knowledge in this area..
bluedevils
on the zaurus itself try
CODE
ssh 127.0.0.1
to confirm that ssh is accepting locally on the Z. Have you implemented any firewalls on the Z or desktop?
Smuffle
QUOTE(bluedevils @ Jan 10 2006, 11:54 PM)
on the zaurus itself try
CODE
ssh 127.0.0.1
to confirm that ssh is accepting locally on the Z.  Have you implemented any firewalls on the Z or desktop?
*


Seems to connect locally without problem (when su) but won't connect from the desktop. I've tried ssh ipadress and ssh zaurus@ipaddress

Firewalls? I haven't changed anything.. just standard Cacko ROM..
bluedevils
from your previous posts can I gather you cannot ssh out *to* your desktop (*nix?)?

can you ping the zaurus? Do you have nmap on your desktop to scan the Z's ports?
Mjolinor
Did you set the user passwords?
Smuffle
QUOTE(Mjolinor @ Jan 11 2006, 01:03 AM)
Did you set the user passwords?
*


I guess a 6 month delay may be considered by some as.. slow (just found out somebody responded ohmy.gif)

Still trying to make it work... How do I set the user passwords? Same as SU?
wpchan
You can change the password with the command passwd in a terminal. Open /etc/passwd or /etc/shadow in a text editor or use cat in a terminal and check the second field. If it is empty, there is no password set for that user. You might also want to try the following for troubleshooting sshd.

Look at /etc/ssh/sshd_config to see what options are enabled. These will override those compiled in as default. If you want to use password to log in, set "PasswordAuthentication yes". Should also set "PermitEmptyPasswords no" and "PermitRootLogin no"; just a suggestion for security reason unless you really want to log in remotely as root. If sshd is started by inetd, I don't think you need to do anything such as restarting sshd manually to read the new config file but I could be wrong on this.

Since you can ssh to localhost, your sshd is working fine. Also as bluedevils suggested, you can test your connectivity by ping (both in and out) or ssh to another machine. You are almost there. Good luck!
Smuffle
Thanks for that (and a belated thanks to Mjolinor).

I set the passwords, as you said, and I started "sshd". On my desktop I typed ssh <Z's IP address> but the connection times out. Also tried ssh zaurus@<Z's IP address>.

Don't seem to be doing to well with this. I can live without it, just thought it would be handy to have.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.