OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: Smuffle on January 09, 2006, 11:59:38 am

Title: Sftp
Post by: Smuffle on January 09, 2006, 11:59:38 am
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.
Title: Sftp
Post by: Mjolinor on January 09, 2006, 12:47:29 pm
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.
Title: Sftp
Post by: Smuffle on January 09, 2006, 01:33:03 pm
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110156\"][{POST_SNAPBACK}][/a][/div]

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?
Title: Sftp
Post by: bluedevils on January 09, 2006, 02:07:14 pm
Code: [Select]
ssh -l rootor
Code: [Select]
ssh -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: [Select]
scp or more precisely to push a file to the zaurus from another machine
Code: [Select]
scp zaurus@:
Title: Sftp
Post by: rickh on January 09, 2006, 04:09:14 pm
Quote
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?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110162\"][{POST_SNAPBACK}][/a][/div]
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.
==
Title: Sftp
Post by: Mjolinor on January 09, 2006, 04:12:24 pm
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
Title: Sftp
Post by: Smuffle on January 09, 2006, 10:39:51 pm
Quote
Code: [Select]
ssh -l rootor
Code: [Select]
ssh -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: [Select]
scp or more precisely to push a file to the zaurus from another machine
Code: [Select]
scp zaurus@:[div align=\"right\"][a href=\"index.php?act=findpost&pid=110169\"][{POST_SNAPBACK}][/a][/div]


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.
Title: Sftp
Post by: Mjolinor on January 10, 2006, 02:12:49 am
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.
Title: Sftp
Post by: Smuffle on January 10, 2006, 02:40:12 am
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110211\"][{POST_SNAPBACK}][/a][/div]

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

?
Title: Sftp
Post by: Mjolinor on January 10, 2006, 04:50:16 am
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.
Title: Sftp
Post by: Smuffle on January 10, 2006, 08:57:55 am
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110226\"][{POST_SNAPBACK}][/a][/div]

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?
Title: Sftp
Post by: bluedevils on January 10, 2006, 09:08:31 am
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).
Title: Sftp
Post by: Smuffle on January 10, 2006, 09:19:53 am
Quote
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).
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110267\"][{POST_SNAPBACK}][/a][/div]

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..
Title: Sftp
Post by: bluedevils on January 10, 2006, 09:54:00 am
on the zaurus itself try
Code: [Select]
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?
Title: Sftp
Post by: Smuffle on January 10, 2006, 10:04:02 am
Quote
on the zaurus itself try
Code: [Select]
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?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110275\"][{POST_SNAPBACK}][/a][/div]

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..
Title: Sftp
Post by: bluedevils on January 10, 2006, 11:01:49 am
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?
Title: Sftp
Post by: Mjolinor on January 10, 2006, 11:03:04 am
Did you set the user passwords?
Title: Sftp
Post by: Smuffle on March 14, 2006, 11:45:00 am
Quote
Did you set the user passwords?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=110285\"][{POST_SNAPBACK}][/a][/div]

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

Still trying to make it work... How do I set the user passwords? Same as SU?
Title: Sftp
Post by: wpchan on March 17, 2006, 06:19:15 pm
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!
Title: Sftp
Post by: Smuffle on March 20, 2006, 08:34:29 am
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.