Ok, so:
SCP is a command line utility, yes. It works like this:
Code:
scp somefile somewhere-else:somefile
so, like:
scp /path/to/some/file [user@]host:/path/to/put/file
the user@ is optional. Here's a real usage example:
Code:
[user@host1 ~]$ touch test-file
[user@host1 ~]$ ls -l test-file
-rw-r--r-- 1 user domain_users 0 Nov 29 09:35 test-file
[user@host1 ~]$ scp test-file xiao@host2.net:/home/xiao/test-file
xiao@host2.net's password:
test-file 100% 0 0.0KB/s 00:00
[user@host1 ~]$
[user@host1 ~]$ ssh xiao@host2.net "ls -l test-file"
xiao@host2.net's password:
-rw-r--r-- 1 xiao xiao 0 Nov 29 09:36 test-file
[user@host1 ~]$
In the above example:
1.) "touch" a file (create a blank file)
2.) look at it, using ls -l
3.) copy the file, from current directory to user xiao at host2 in /home/xiao/
4.) enter password, file copies
5.) ssh to host2 and look at the file, to confirm it's there
As for selinux, you have to be root when you change selinux from Enforcing to Permissive, and also, I think that Enforcing and Permissive are case sensitive.
Code:
[user@host ~]$ setenforce Enforcing
setenforce: setenforce() failed
[user@host ~]$ sudo su -
[root@host ~]# setenforce Enforcing
[root@host ~]# getenforce
Enforcing
[root@host ~]# setenforce Permissive
[root@host ~]# getenforce
Permissive
[root@host ~]#
If you can change it to Permissive, and then try again, maybe you can find out what's going on. You can also look in /var/log/messages to see if there are any SELinux alerts, that'll tell you if selinux is the issue. You should think about installing setroubleshoot-server to help you diagnose SELinux problems.
Code:
[root@host ~]# yum info setroubleshoot-server
Loaded plugins: rhnplugin, security
global-el5 | 2.1 kB 00:00
openafs-el5 | 2.1 kB 00:00
Available Packages
Name : setroubleshoot-server
Arch : noarch
Version : 2.0.5
Release : 5.el5
Size : 1.2 M
Repo : rhel-x86_64-server-5
Summary : SELinux troubleshoot server
License : GPLv2+
Description: Provides tools to help diagnose SELinux problems. When AVC messages
: are generated an alert can be generated that will give information
: about the problem and help track its resolution. Alerts can be configured
: to user preference. The same tools can be run on existing log files.
Anyway, love and learn scp, it's very useful.