Author Topic: scp to VL fails  (Read 6675 times)


  • Member
  • *
  • Posts: 86
scp to VL fails
« on: September 06, 2007, 01:45:28 pm »
running sshd on vl 5.8 std gold
ssh to the machine works fine

scp fails
here is the verbose output from the client.  the "you are working as root" just before it fails sounds like its getting a login shell but not actually running the scp.

NOTE: I know I should not be doing this as root, this was just a test so please don't yell at me about that.

COTDJPHGP71:/cygdrive/c/xboat_docked $ scp -v openfire_3_3_2[1].tar.gz root@
Executing: program /usr/bin/ssh host, user root, command scp -v -t /home
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /cygdrive/c/temp/aix/.ssh/identity type -1
debug1: identity file /cygdrive/c/temp/aix/.ssh/id_rsa type 1
debug1: identity file /cygdrive/c/temp/aix/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.4
debug1: match: OpenSSH_4.4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in /cygdrive/c/temp/aix/.ssh/known_hosts:50
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /cygdrive/c/temp/aix/.ssh/identity
debug1: Offering public key: /cygdrive/c/temp/aix/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering public key: /cygdrive/c/temp/aix/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 434
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t /home
You are working as root
COTDJPHGP71:/cygdrive/c/xboat_docked $ debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0

Evil Overlord rule 58 My doomsday device will not employ a large red digital countdown device unless it is absolutely necessary.  If a countdown device proves to be necessary, the doomsday device will be set to activate when the counter reaches 00:10:00, rather than 00:00:00.


  • Vectorian
  • ****
  • Posts: 1132
Re: scp to VL fails
« Reply #1 on: September 06, 2007, 01:58:16 pm »
Perhaps it due to the missing target file:
scp -v openfire_3_3_2[1].tar.gz root@[1].tar.gz

hth and good luck!


  • Vectorite
  • ***
  • Posts: 340
Re: scp to VL fails
« Reply #2 on: September 06, 2007, 02:58:53 pm »
There was a bug in the configuration skeleton files that was fixed somewhere around the time Standard was released. I can not find the thread in the forums but if you could post the contents of '/etc/profile' and '~/.bashrc' we could determine whether your system has the correct setup.
A complex system that works is invariably found to have evolved from a simple system that works.


  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: scp to VL fails
« Reply #3 on: September 06, 2007, 06:02:37 pm »
Same problem for me...
It also fails when using ftp over ssh.

Code: [Select]
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.

# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="| %s"
export LESS="-M"

# If the user doesn't have a .inputrc, use the one in /etc.
if [ ! -r "$HOME/.inputrc" ]; then
  export INPUTRC=/etc/inputrc

# Set the default system $PATH:

# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH.  Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
  if [ ! $? = 0 ]; then

# I had problems using 'eval tset' instead of 'TERM=', but you might want to
# try it anyway. I think with the right /etc/termcap it would work great.
# eval `tset -sQ "$TERM"`
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then

# Set ksh93 visual editing mode:
if [ "$SHELL" = "/bin/ksh" ]; then
#  VISUAL=gmacs
#  VISUAL=vi

# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" ]; then
 PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
 PS1='! ${PWD/#$HOME/~}$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1='$ '
 PS1='\u@\h:\w\$ '
PS2='> '

# Default umask.  A umask of 022 prevents new files from being created group
# and world writable. This is Slackware default
umask 022

# Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
if [ "$SHELL" = "/bin/zsh" ]; then
 eval `dircolors -z`
elif [ "$SHELL" = "/bin/ash" ]; then
 eval `dircolors -s`
 eval `dircolors -b`

# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y

# Append any additional sh scripts found in /etc/profile.d/:
for profile_script in /etc/profile.d/*.sh ; do
  if [ -x $profile_script ]; then
    . $profile_script
unset profile_script

# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then

Code: [Select]
# .bashrc
# sourced by BASH everytime it start
# Set various environment variables

## These should be set by /etc/profile
## But sometime, bash missed them. So here is the push
export PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/opt/bin:/opt/kde/bin:/usr/X11/bin:/usr/local/games"
for SH in /etc/profile.d/*.sh; do
   . $SH

## Set a default shell prompt:
## A complete one
#PS1="${PS_CYAN}\h:/\w\n${PS_NORMAL}\u:\\$ "
#PS2="> "

## Standard with color
## This is the plain standard prompt
#PS2="> "

## This is the plain standard prompt
#PS1="\u@\h:\\$ "
#PS2="> "
dbus-launch --sh-syntax > $HOME/.dbus-env 2>/dev/null
 source $HOME/.dbus-env 2>/dev/null

## Set fancy colors
eval `dircolors -b`

## Set this for your first choice
export BROWSER=seamonkey
#export BROWSER=firefox
#export BROWSER=opera
#export EXPLORER=konqueror
#export NETWORK_EXPLORER=konqueror
#export AUDIO_PLAYER=xmms
#export VIDEO_PLAYER=gxine
#let root use gui
xhost +si:localuser:root >/dev/null


  • Vectorite
  • ***
  • Posts: 340
Re: scp to VL fails
« Reply #4 on: September 06, 2007, 06:36:29 pm »
OK, I don't have access to VL 5.8 SOHO machine right now (I believe it has the proper fixes in place) so I will try to go from my recollection.

For the '~/.bashrc' file, the problem is that the last line (xhost...) generates error output to your login terminal. The error itself is not important, but the text of the message confuses the SCP transaction. I think if you substitute the following code for the last bit, it will correct the problem.

#let root use gui unless logged in from a tty
if [[ ! $(/usr/bin/tty >/dev/null) ]] ; then
  xhost +si:localuser:root >/dev/null

The other file that causes a similar problem is not /etc/profile (I was mistaken), but the Vector script in the /etc/profile.d directory (it is called something like "" IIRC). It has a bunch of statements which print out a list of useful commands. This output also confuses SCP and all of those commands need to be wrapped with the above IF statements:

if [[ ! $(/usr/bin/tty >/dev/null) ]] ; then
  echo ...
  echo ...
  echo ...

Sorry about the confusing instructions.
A complex system that works is invariably found to have evolved from a simple system that works.