VectorLinux
August 23, 2014, 06:58:30 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: scp to VL fails  (Read 2666 times)
aixuser01
Member
*
Posts: 86


« on: September 06, 2007, 12: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@162.114.124.225:/home
Executing: program /usr/bin/ssh host 162.114.124.225, 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 162.114.124.225 [162.114.124.225] 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 '162.114.124.225' 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_REQUEST sent
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

Logged

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.
newt
Vectorian
****
Posts: 1132



« Reply #1 on: September 06, 2007, 12:58:16 pm »

Perhaps it due to the missing target file:
scp -v openfire_3_3_2[1].tar.gz root@162.114.124.225:/home/openfire_3_3_2[1].tar.gz

hth and good luck!
Logged
saulgoode
Vectorite
***
Posts: 340



« Reply #2 on: September 06, 2007, 01: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.
Logged

A complex system that works is invariably found to have evolved from a simple system that works.
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #3 on: September 06, 2007, 05:02:37 pm »

Same problem for me...
It also fails when using ftp over ssh.

/etc/profile:
Code:
# /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="|lesspipe.sh %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
fi

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/bin:/usr/local/games"

# 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
    PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
  fi
fi

# 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
 TERM=linux
fi

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

# 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='$ '
else
 PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 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`
else
 eval `dircolors -b`
fi

# 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
fi

# 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
  fi
done
unset profile_script

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

~/.bashrc
Code:
# .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
done

## 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
#PS1="${PS_DGREEN}\u${PS_YELLOW}@${PS_DGREEN}\h:\\$ ${PS_NORMAL}"
#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
export DISPLAY=$DISPLAY
#let root use gui
xhost +si:localuser:root >/dev/null
Logged
saulgoode
Vectorite
***
Posts: 340



« Reply #4 on: September 06, 2007, 05: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
fi

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 "vector.sh" 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 ...
  ...
fi


Sorry about the confusing instructions.
Logged

A complex system that works is invariably found to have evolved from a simple system that works.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!