View Single Post
  #1   (View Single Post)  
Old 9th March 2010
vi5in's Avatar
vi5in vi5in is offline
Real Name: Vivin Paliath
Port Guard
 
Join Date: May 2008
Location: Arizona
Posts: 17
Default scp problem (ps: Process environment requires procfs(5))

Hello,

I've been scp'ing into my FreeBSD box without any problem. However, today I was met with this:

Code:
vivin@serenity ~/Projects/code
$ scp -r myusername@www.mybox.net:~/code/agnostic .
Password:
ps: Process environment requires procfs(5)
Initializing new SSH agent...

vivin@serenity ~/Projects/code
$
I can ssh into the box without any problem. Running "ps -ef" on the same box gives the same problem. I've never run into this issue before. I tried rebooting, but that didn't help either.

EDIT

Ok, I made the "ps" problem go away by putting this in my fstab:

Code:
proc                    /proc           procfs  rw              0       0
linproc                 /compat/linux/proc      linprocfs       rw      0       0
and then
Code:
vivin@enterprise ~
$ sudo mount /compat/linux/proc

vivin@enterprise ~
$ sudo mount /proc
Now I don't get that error when I scp, but I get:

Code:
vivin@serenity ~/Projects/code
$ scp -r myusername@www.mybox.net:~/code/agnostic .
Password:
Initializing new SSH agent...

vivin@serenity ~/Projects/code
$
EDIT

I wonder if this is related to my public key. I created one because I am using github, and it is in my .ssh/

I figured out the problem. I had this in my .bashrc:

Code:
PS1='\[\033]0;\u on \H [\w]\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
alias ls='gnuls --color'
SSH_ENV="$HOME/.ssh/environment"

function start_agent {
  echo "Initializing new SSH agent..."
  /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
  echo succeeded
  chmod 600 "${SSH_ENV}"
  . "${SSH_ENV}" > /dev/null
  /usr/bin/ssh-add;
}

# Source SSH settings, if applicable
if [ -f "${SSH_ENV}" ]; then
  . "${SSH_ENV}" > /dev/null
  #ps ${SSH_AGENT_PID} doesn't work under cywgin
  ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
    start_agent;
  }
else
  start_agent;
fi
And this was causing the SCP to fail...

Last edited by vi5in; 9th March 2010 at 03:31 PM.
Reply With Quote