I have a working PUTTY (on windows box) and SSH (on linux box) config.
But running pscp from windows to copy file to and from an opensuse box I get an out of memory error.
F:\02_outils\_win\PuTTY>pscp I:\001_serveur\a_file.txt my_linux_box:/home/fred/new_file.txt
Fatal: Out of memory!
Where “my_linux_box” is the name of a working PUTTY stored session for the user fred.
( That mean when starting PUTTY and loading the stored session “my_linux_box” I am connected directly on the linux box under the account fred as I am using key authentication ).
From the PUTTY site I have found this :
A.7.6 When attempting a file transfer, either PSCP or PSFTP says ‘Out of memory’ and dies.
This is almost always caused by your login scripts on the server generating output. PSCP or PSFTP will receive that output when they were expecting to see the start of a file transfer protocol, and they will attempt to interpret the output as file-transfer protocol. This will usually lead to an ‘out of memory’ error for much the same reasons as given in question A.7.5.
This is a setup problem in your account on your server, not a PSCP/PSFTP bug. Your login scripts should never generate output during non-interactive sessions; secure file transfer is not the only form of remote access that will break if they do.
[QUOTE] On Unix, a simple fix is to ensure that all the parts of your login script that might generate output are in .profile (if you use a Bourne shell derivative) or .login (if you use a C shell). Putting them in more general files such as .bashrc or .cshrc is liable to lead to problems.
[/QUOTE]
How to get pscp working ?
Help would be appreciated.
PUTTY windows version : 0.62
PSCP windows version : 0.62
Opensuse 12.1
openssh : 5.8p.2
I am not a windows user, thus I am also not a PUTTY user. But IMHO the explanation A.7.6 is rather clear and my question would be: did you check what is suggested there. When you did, what is the result? When you didn’t, why?
> Hello.
>
> I have a working PUTTY (on windows box) and SSH (on linux box) config.
>
> But running pscp from windows to copy file to and from an opensuse box I
> get an out of memory error.
>
Hi
Check the /etc/ssh/sshd_config file and ensure the following are set to
no;
PrintMotd no
PrintLastLog no
Then restart the sshd daemon.
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 1 day 14:49, 3 users, load average: 0.15, 0.13, 0.08
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU
% $SHELL -c date
Tue Oct 30 09:51:25 CDT 2012
% ssh localhost date
Tue Oct 30 09:51:35 CDT 2012
%
Note that "% " is my shell prompt there.
The first of those tests starts a new shell to run the command date
The second test does an ssh into the system (you could you a different system name from “localhost”) and runs the “date” command there.
In both cases, there is no extraneous output. The only output comes from the “date” command. That is what you want. If there is extraneous output, that is the problem being described in the A.7.6 that you quoted. You will have to eliminate any such extraneous output.
I am not a system engineer and I have not modified anything belonging to the system.
English is not my mother language, but what I understood is :
They are not suggesting anything, they just say that opensuse is badly written ( lol!Heuuu from the point of view of PUTTY writer :
This is almost always caused by your login scripts on the server generating output. PSCP or PSFTP will receive that output when they were expecting to see the start of a file transfer protocol, and they will attempt to interpret the output as file-transfer protocol. This will usually lead to an ‘out of memory’ error for much the same reasons as given in question A.7.5.
** )**
So If you know what to do you have better to help me by given a way to search where.
1°) Printmotd is commented out but default value is yes
Uncommented and Set to no
2°) PrintLastLog is commented out but default value is yes
Uncommented and Set to no
Still failed.
For information, I have found a real windows apps which run fine ( winscp 5.1.0 ) which use the code of putty and scp ( say in the copyright ).
As pscp is a dos app which run in a dos console I am wondering if the problem is not coming for that reason.
As I have found another software, we can stop there.
But If you are interesting in founding a solution I can continue trying more test and_or modification.
My main question was: there is a whole story you found, but what did you do with that (apart from posting it here). Your answer could have been: I do not understand a word of it, please explain. Your answer could also have been" I did check fred’s .bashrc and … All depends on your level of knowledge, which we can not guess.
They suggest you to check your .bashrc. That is not a system file, it is in the user’s (fred, if I understood correct) home directory. When I read correct, it should contain no statements that create output to standard out.
malcolmlewis;2499935 Wrote:
> On Tue, 30 Oct 2012 13:46:02 +0000, jcdole wrote:
>
> > Hello.
> >
> > I have a working PUTTY (on windows box) and SSH (on linux box)
> config.
> >
> > But running pscp from windows to copy file to and from an opensuse
> box I
> > get an out of memory error.
> >
>
> Hi
> Check the /etc/ssh/sshd_config file and ensure the following are set
> to no;
> >
Code:
> >
> PrintMotd no
> PrintLastLog no
>
> >
> Then restart the sshd daemon.
>
> –
> Cheers Malcolm °¿° (Linux Counter #276890)
> openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
> up 1 day 14:49, 3 users, load average: 0.15, 0.13, 0.08
> CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU
1°) Printmotd is commented out but default value is yes
Uncommented and Set to no
2°) PrintLastLog is commented out but default value is yes
Uncommented and Set to no
Still failed.
For information, I have found a real windows apps which run fine (
winscp 5.1.0 ) which use the code of putty and scp ( say in the
copyright ).
As pscp is a dos app which run in a dos console I am wondering if the
problem is not coming for that reason.
As I have found another software, we can stop there.
But If you are interesting in founding a solution I can continue trying
more test and_or modification.
Thank you for taking time to help me.
Hi
No problem, you have a good alternative I’ve used winscp in the past
but only used putty as an ssh client
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 2 days 20:33, 4 users, load average: 0.17, 0.14, 0.14
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU
1°) So why two softwares based on the same code ( PSCP and WINSCP ) have different behaviour.
2°) As there is no effective interactive login ( opposed as in ssh login ) how could I guess that the login script they are speaking about is in relation with bash.bashrc.local.
This is a setup problem in your account on your server, not a PSCP/PSFTP bug. Your login scripts should never generate output during non-interactive sessions; secure file transfer is not the only form of remote access that will break if they do.
3°) I have not check bashrc nor bash.bashrc.local.because I did not know that I have to do. But I have found another software that did the job.
#!/bin/bash
#
# /etc/bash.bashrc.local
#
BIG_INFO_IS="Welcome. It is the last day for register"
export BIG_INFO_IS
**if $- != *i* ]]; then return; fi**
echo "Message of the day is : $BIG_INFO_IS"
The message is not echoed on non interactive session and then PSCP does not complain any more.
I think that now this thread is really closed and thanks again.