Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

scp

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


Tariq.Lahyani at aa

Nov 28, 2001, 3:32 PM

Post #1 of 9 (218 views)
Permalink
scp

Hello -

I am trying to use scp (openssh_3.0), but every time I run it, I get the following error:

stty: Not a typewriter

When I run it with -v , it shows that authentication (pub key) succeeds, but it fails to read the file. If anybody has a clue as to what's going on here, any help will be appreciated. Thanks.

Tariq
tariq.lahyani[at]aa.com


djm at mindrot

Nov 28, 2001, 3:41 PM

Post #2 of 9 (214 views)
Permalink
Re: scp [In reply to]

On Wed, 28 Nov 2001, Tariq Lahyani wrote:

> Hello -
>
> I am trying to use scp (openssh_3.0), but every time I run it, I get
> the following error:
>
> stty: Not a typewriter

Do you have .bashrc or similar scripts that are being run when non-login
sessions are started? If so, fix them.

-d

--
| By convention there is color, \\ Damien Miller <djm[at]mindrot.org>
| By convention sweetness, By convention bitterness, \\ www.mindrot.org
| But in reality there are atoms and space - Democritus (c. 400 BCE)


Tariq.Lahyani at aa

Nov 30, 2001, 8:26 AM

Post #3 of 9 (214 views)
Permalink
Re: scp [In reply to]

Hello again -

Has anybody tried scp or sftp successfully with openssh_3. I haven't been able to so far. Here is what happens when I run the command:

Executing: program /opt/openssh2/bin/ssh host machine4, user myuser, command scp -v -f /tmp/myfile
OpenSSH_3.0p1, SSH protocols 1.5/2.0, OpenSSL 0x0090600f
...
...
debug1: ssh-userauth2 successful: method publickey
debug1: fd 8 setting O_NONBLOCK
debug1: fd 9 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: Sending command: scp -v -f /tmp/myfile
debug1: channel 0: open confirm rwindow 0 rmax 16384
debug1: channel 0: read<=0 rfd 8 len 0
debug1: channel 0: read failed
debug1: channel 0: input open -> drain
debug1: channel 0: close_read
debug1: channel 0: ibuf empty
debug1: channel 0: input drain -> closed
debug1: channel 0: send eof
...
...

Is it normal that the command it sends is diff. than the original one? I mean, it adds -f and suppresses the destination file. The same scenario happens with sftp. Please let me know if you have an idea what might be going wrong here. Thanks.

Tariq



>>> Damien Miller <djm[at]mindrot.org> 11/28/01 05:41PM >>>
On Wed, 28 Nov 2001, Tariq Lahyani wrote:

> Hello -
>
> I am trying to use scp (openssh_3.0), but every time I run it, I get
> the following error:
>
> stty: Not a typewriter

Do you have .bashrc or similar scripts that are being run when non-login
sessions are started? If so, fix them.

-d

--
| By convention there is color, \\ Damien Miller <djm[at]mindrot.org>
| By convention sweetness, By convention bitterness, \\ www.mindrot.org
| But in reality there are atoms and space - Democritus (c. 400 BCE)


Eric.Ladner at ChevronTexaco

Oct 14, 2002, 11:25 AM

Post #4 of 9 (214 views)
Permalink
RE: scp [In reply to]

Or to copy sym links as sym links and not the file they point to.

-----Original Message-----
From: Douglas Boldt [mailto:doug[at]endai.com]
Sent: Saturday, October 12, 2002 3:52 PM
To: openssh-unix-dev[at]mindrot.org
Subject: scp


I would absolutely love a flag in scp to ignore sym-links.

Douglas Boldt
Endai WorldWide, NYC
Technical Operations Manager
212-430-0808 x118



_______________________________________________
openssh-unix-dev[at]mindrot.org mailing list
http://www.mindrot.org/mailman/listinfo/openssh-unix-dev


jmknoble at pobox

Oct 14, 2002, 12:25 PM

Post #5 of 9 (214 views)
Permalink
Re: scp [In reply to]

Circa 2002-10-14 14:25:22 -0500 dixit Ladner, Eric (Eric.Ladner):

: Or to copy sym links as sym links and not the file they point to.

You must mean rsync ( http://rsync.samba.org/ ). 'rsync -l' copies
symlinks as symlinks, while 'rsync -a' copies device files, owners,
permissions, and datestamps in addition.

: -----Original Message-----
: From: Douglas Boldt [mailto:doug[at]endai.com]
: Sent: Saturday, October 12, 2002 3:52 PM
: To: openssh-unix-dev[at]mindrot.org
: Subject: scp
:
: I would absolutely love a flag in scp to ignore sym-links.

Douglas, you'll probably get more mileage out of rsync than scp for
doing this. If you merely don't want to copy symlinks because they
take too much time to copy, then 'rsync -a' will handle that
automatically; it doesn't copy something it doesn't have to.

If, instead, you wish to exclude symlinks that point outside of the
directory tree you're copying, use rsync's '--safe-links' option.

If you really don't want to copy any symlinks, you'll need to wrap some
scripting around 'find <dir> -type l' together with
'rsync -a --exclude-from=<file>'.

Good luck to both of you.

--
jim knoble | jmknoble[at]pobox.com | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
"I am non-refutable." --Enik the Altrusian


Eric.Ladner at ChevronTexaco

Oct 16, 2002, 10:20 AM

Post #6 of 9 (214 views)
Permalink
RE: scp [In reply to]

True, true, but that's another piece of software I have to install
and maintain just to have that functionality enabled for the
infrequent times that I do need to copy a tree from one server to
another.

Actually, my current workaround is like this to copy a tree:

cd /some/tree; tar -cf - . | ssh remote_host "cd /some/other/tree; tar -xvf
-"

It works like a champ, but scp with link copy would be cleaner:

scp -rp /some/tree/* remote_host:/some/other/tree

Which is more intuitive?

E

-----Original Message-----
From: Jim Knoble [mailto:jmknoble[at]pobox.com]
Sent: Monday, October 14, 2002 3:26 PM
To: openssh-unix-dev[at]mindrot.org
Subject: Re: scp


Circa 2002-10-14 14:25:22 -0500 dixit Ladner, Eric (Eric.Ladner):

: Or to copy sym links as sym links and not the file they point to.

You must mean rsync ( http://rsync.samba.org/ ). 'rsync -l' copies
symlinks as symlinks, while 'rsync -a' copies device files, owners,
permissions, and datestamps in addition.

: -----Original Message-----
: From: Douglas Boldt [mailto:doug[at]endai.com]
: Sent: Saturday, October 12, 2002 3:52 PM
: To: openssh-unix-dev[at]mindrot.org
: Subject: scp
:
: I would absolutely love a flag in scp to ignore sym-links.

Douglas, you'll probably get more mileage out of rsync than scp for
doing this. If you merely don't want to copy symlinks because they
take too much time to copy, then 'rsync -a' will handle that
automatically; it doesn't copy something it doesn't have to.

If, instead, you wish to exclude symlinks that point outside of the
directory tree you're copying, use rsync's '--safe-links' option.

If you really don't want to copy any symlinks, you'll need to wrap some
scripting around 'find <dir> -type l' together with
'rsync -a --exclude-from=<file>'.

Good luck to both of you.

--
jim knoble | jmknoble[at]pobox.com | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
"I am non-refutable." --Enik the Altrusian


jmknoble at pobox

Oct 17, 2002, 4:34 PM

Post #7 of 9 (214 views)
Permalink
Re: scp [In reply to]

Circa 2002-10-16 13:20:32 -0500 dixit Ladner, Eric (Eric.Ladner):

: True, true, but that's another piece of software I have to install
: and maintain just to have that functionality enabled for the
: infrequent times that I do need to copy a tree from one server to
: another.
:
: Actually, my current workaround is like this to copy a tree:
:
: cd /some/tree; tar -cf - . | ssh remote_host "cd /some/other/tree; tar -xvf
: -"
:
: It works like a champ, but scp with link copy would be cleaner:
:
: scp -rp /some/tree/* remote_host:/some/other/tree
:
: Which is more intuitive?

Actually, to many folks at all used to the Unix environment, the tar
pipe is significantly more obvious and "intuitive" (i.e., conforming to
their prior experience). It used to be that the tar pipe was necessary
to copy or move directory trees even on a local system while preserving
symlinks and whatnot. It's only recently that folks seem to have
forgotten how to do that.

By the way, what you probably want on the extracting end is:

tar -xvpf -

in order to to preserve permissions. If using GNU tar, you may also
also want '--same-owner' and '--sparse'.

--
jim knoble | jmknoble[at]pobox.com | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
"I am non-refutable." --Enik the Altrusian


bob at proulx

Oct 19, 2002, 9:59 AM

Post #8 of 9 (214 views)
Permalink
Re: scp [In reply to]

Jim Knoble <jmknoble[at]pobox.com> [2002-10-17 17:34:48 -0700]:
> Circa 2002-10-16 13:20:32 -0500 dixit Ladner, Eric (Eric.Ladner):
> : Actually, my current workaround is like this to copy a tree:
> : cd /some/tree; tar -cf - . | ssh remote_host "cd /some/other/tree; tar -xvf -"
>
> By the way, what you probably want on the extracting end is:
>
> tar -xvpf -
>
> in order to to preserve permissions. If using GNU tar, you may also
> also want '--same-owner' and '--sparse'.

Actually I think the options specified were fine. IIRC if you are
root then the permission restoration is the default for tar. If you
are not root then modern OS configuration won't allow a non-root user
to chown a file to another user and this would fail anyway. Therefore
the default behavior without the 'p' option is the usual desired
behavior.

On older operating systems especially those based upon SysV you could
chown files to other users. But that is a less desirable
configuration IMNHO. (Even though some still preserve that capability
for their legacy. But I always turn that off on hpux and get a modern
behavior.)

Bob


mouring at eviladmin

Oct 26, 2009, 8:39 AM

Post #9 of 9 (213 views)
Permalink
Re: SCP [In reply to]

I believe you are looking for:

-S program
Name of program to use for the encrypted connection.
The program
must understand ssh(1) options.

This has existed since for a long time.

e.g.

scp -S /path/to/scp remote:file localname

- Ben


On Oct 26, 2009, at 10:21 AM, Scott Neugroschl wrote:

> I'm using 5.0p1 (Yeah, yeah. I know.). For various reasons, I am
> unable
> to upgrade to the latest and greatest, which probably would solve my
> problem.
>
>
>
> Here's my question.
>
>
>
> When doing an scp from remote to local (e.g.: scp user[at]host:remote
> localfile), is there any way to specify the path to the remote scp?
> Or
> do I have to patch the code to allow it?
>
>
>
>
>
>
>
> ----
>
> Scott Neugroschl
>
> XYPRO Technology Corporation
>
> scott_n[at]xypro.com
>
> 805-583-2874
>
>
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev[at]mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev[at]mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.