# SSH... Bad configuration option: PermitLocalCommand



## freescottsthoughts (Aug 11, 2013)

This is what *I* keep getting every time *I* try to use scp. This tells me *I* have been hacked at some point. How can *I* get scp to work so *I* can get my stuff off the server and onto another with ease?

```
[CMD]scp -r ca user@111.111.111.111:/usr/local/www/sites[/CMD]
command-line: line 0: Bad configuration option: PermitLocalCommand
lost connection
```


----------



## J65nko (Aug 12, 2013)

Maybe http://serverfault.com/questions/92321/debian-permit-local-command-issue?


----------



## freescottsthoughts (Aug 12, 2013)

These are all Linux machines. I need a *F*reeBSD fix.


----------



## J65nko (Aug 12, 2013)

Can you do `$ ssh -o PermitLocalCommand=no [email=user@111.111.111.111]user@111.111.111.111[/email]`?

What do you get if you run the following commands?


```
[cmd=#]sh[/cmd]
[cmd=#]which scp[/cmd]
/usr/bin/scp
[cmd=#]strings $(which scp) | grep \/[/cmd]
/libexec/ld-elf.so.1
5/T 
I;,$v/I
%s/%s: name too long
%s/%s
/bin/cp
[color=blue]/usr/bin/ssh[/color]
```


----------

