when I log onto a server in my department from my computer at home:
ssh -x name@domain
then I want to get some files to my computer. I tried using
scp from the remote end, or sftp from local pc. but
scp *.ps /home/name/bio/. returns " cannot create regular file `home/name/bio/.’: No such file or directory", the same result as cp.
sftp name@domain:/usr1/name/bio08/N1/*.ps /home/name/bio/. returns “received message too long”. there’s an article talking about it, but still I’ve no idea how to fix it.
The sftp and scp are independent of any ssh session you may have going at the same time, so everything must be specified.
scp name@domain:/usr1/name/bio08/N1/'*.ps' /home/name/bio/.
or
sftp name@domain
cd /usr1/name/bio08/N1/
lcd /home/name/bio
get *.ps .
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The first example looks wrong… you cannot copy over an SSH connection
without specifying the host… if you leave off the host ‘scp’ literally
works just like ‘cp’ in that it copies to the local box, which is
exactly why you are seeing what you are seeing.
The other example… take the ‘.’ off the end of …/bio/. to see if
that helps. Otherwise swap ‘scp’ for your ‘sftp’ to see if that helps
as I think it will. ‘scp’ is made to use like you are using ‘sftp’.
Good luck.
paulga wrote:
> when I log onto a server in my department from my computer at home:
> ssh -x name@domain
> then I want to get some files to my computer. I tried using
> scp from the remote end, or sftp from local pc. but
> scp *.ps /home/name/bio/. returns " cannot create regular file
> `home/name/bio/.’: No such file or directory", the same result as cp.
> sftp name@domain:/usr1/name/bio08/N1/*.ps /home/name/bio/. returns
> “received message too long”. there’s an article talking about it, but
> still I’ve no idea how to fix it.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIwGIi3s42bA80+9kRAhaEAJ9ej4d77AK8+CnsnwfJVA+S1pBeOACdEn0P
izxzfydSemL+oKXM0MAAOqE=
=F//g
-----END PGP SIGNATURE-----
not work.
sftp name@domain
returns “Received message too long 1920298606” in my case.
there’s an article suggesting this:
SSH Frequently Asked Questions
but I didn’t find the solution
It means you have some output from a shell init file at the other end. The article explains far better than I could, do read it carefully.
In order for this to work, the SSH session must be “clean” — that is, it must have on it only information transmitted by the programs at either end. What often happens, though, is that there are statements in either the system or per-user shell startup files on the server (.bashrc, .profile, /etc/csh.cshrc, .login, etc.) which output text messages on login, intended to be read by humans (like fortune, echo “Hi there!”, etc.). Such code should only produce output on interactive logins, when there is a tty attached to standard input. If it does not make this test, it will insert these text messages where they don’t belong: in this case, polluting the protocol stream between scp2/sftp and sftp-server. The first four bytes of the text gets interpreted as a 32-bit packet length, which will usually be a wildly large number, provoking the error message above. Notice that:
1416586337 decimal = 546F6461 hex = “Toda” ASCII
suggesting a string beginning “Today…” (or maybe “Thank-you” in transliterated Hebrew).
Following the suggestion of the article, your number 1920298606 is 72756E6E hex which are the characters “runn”. You must have a echo “running …” in some init file.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
No no… forget sftp. ‘scp’ only.
Good luck.
paulga wrote:
> not work.
>
> Code:
> --------------------
> sftp name@domain
> --------------------
>
> returns “Received message too long 1920298606” in my case.
> there’s an article suggesting this:
> ‘SSH Frequently Asked Questions’
> (http://www.snailbook.com/faq/sftp-corruption.auto.html)
>
> but I didn’t find the solution
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIwHuE3s42bA80+9kRAiqHAJ0c42dc5wM6nF1k20z5sH3TqbzmigCcDNcK
KtBJEXUhSxjYdFdS4B07Wzg=
=XGf8
-----END PGP SIGNATURE-----
is this file in remote server or my own computer?
but this is difficult to find.
that article suggest using sshd to avoid the problem…but how?
it must be this echo:
This is tokewanna.
running cshrc
this msg appears after I log in.
Yeah, get rid of it or use scp.
using scp name@domain:/bio08/N1/*.ps /home/.
(or should it be “name@domain:bio08/N1/*.ps” ) ?
returns ‘running cshrc’
and the transfer didn’t happen
so how to get rid of that echo?
Find out which csh init file is doing it and remove it.
I don’t know even where to look for it…
Read the man page for csh and see what are the names of the files it reads on startup and then examine each one.
Hi
In your case can you try a GUI? Nautilus (sftp://name@server or
Konqueror fish://name@server). Then it’s just drag and drop.
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.11-0.1-default
up 12:44, 2 users, load average: 0.08, 0.09, 0.14
GPU GeForce 6600 TE/6200 TE - Driver Version: 173.14.12
I don’t think that will work either since underneath they still depend on the ssh or sftp server at the other end.
Maybe the sysadmin put this line in some csh init file. Maybe ask if you can change your shell to something that might not have the unwanted echo, like bash. I’m assuming it’s not necessarily a Linux system at the other end, could be some Unix system.
whereis csh
csh: /bin/csh /etc/csh.login /etc/csh.cshrc /usr/share/man/man1/csh.1.gz
what’s the man page of csh? not sure if I have the right to edit it
and fish://name@domain is not recognized by firefox.
Run “man csh” in a terminal window.
fish:// requires Konqueror, and like I said, I don’t think it will work either.
paulga wrote:
> when I log onto a server in my department from my computer at home:
> ssh -x name@domain
> then I want to get some files to my computer. I tried using
> scp from the remote end, or sftp from local pc. but
> scp *.ps /home/name/bio/. returns " cannot create regular file
> `home/name/bio/.’: No such file or directory", the same result as cp.
> sftp name@domain:/usr1/name/bio08/N1/*.ps /home/name/bio/. returns
> “received message too long”. there’s an article talking about it, but
> still I’ve no idea how to fix it.
You know that using ssh works from your home computer to the department
machine. But then you go and test an FTP (for which a daemon has to run on
the remote) or the scp from the department machine, which hasn’t stored
your home computer’s key. You’d have to ssh to the deparment, the ssh back
to home, to get the key. But Why?
Why not use scp in the same direction that allready works for ssh?
Not running it from the remote, but from home.
scp user@department://data_dir/*.ps /home/dest/
You will be prompted for the password on the remote machine.
Don’t put a ‘.’ at the end of the destination. Let it end on a ‘/’
ssh to home? my computer is not a server however.
you don’t know, the “scp command” simply gives “receiving too long a message”
is there an easy way to get remote files?
paulga wrote:
> ssh to home? my computer is not a server however.
> you don’t know, the “scp command” simply gives “receiving too long a
> message”
> is there an easy way to get remote files?
This is the easy way.
There might be a language problem, understanding the first paragraph of my
message.
From your home PC, just try:
scp user@department://data_dir/*.ps /home/dest/
Of course, you have to fill in the right username, computername, and path’s.
You will be prompted for the password on the remote machine.
Don’t put a ‘.’ at the end of the destination. Let it end on a ‘/’