scp and ~/.bashrc errors, still around with Fedora

Ronny Buchmann ronny-vlug at vlugnet.org
Fri Apr 23 08:44:00 UTC 2004


On Thursday 22 April 2004 19:35, Alan Cox wrote:
> On Thu, Apr 22, 2004 at 04:37:34PM +0100, Gavin Henry wrote:
> > Apparently, they say that it's the echo features etc. I have tried
> > commenting everything out, but even motd or if you have never logged in
> > before, trips it up.
>
> Ditto. I actually now suspect its either a straight forward ssh breakage or
> its something to do with the combination of pam and ssh
It's actually a problem in ssh.

A password is only read from /dev/tty, but when running scp (or ssh with a 
command), you don't get a tty.

in sshconnect2.c:
userauth_passwd()
...
         password = read_passphrase(prompt, 0);


One can try:

ssh -t -x userx at host1 "ssh usery at host2"

wich actually works (as it forces tty allocation), without -t you get the same 
error, as when doing remote to remote scp.

So to scp between remote hosts, you need to:

ssh -t -x userx at host1 "scp file usery at host2"


Maybe scp should be fixed like this
--- scp.c.orig  2004-04-23 10:34:57.000000000 +0200
+++ scp.c       2004-04-23 10:41:57.000000000 +0200
@@ -379,7 +379,7 @@
                src = colon(argv[i]);
                if (src) {      /* remote to remote */
                        static char *ssh_options =
-                           "-x -o'ClearAllForwardings yes'";
+                           "-t -x -o'ClearAllForwardings yes'";
                        *src++ = 0;
                        if (*src == 0)
                                src = ".";


-- 
http://linuxwiki.org/RonnyBuchmann





More information about the fedora-devel-list mailing list