我在Fedora中有两个用户:
用户Wani的.bashrc的内容是:
# .bashrc
echo "Hello"
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
Run Code Online (Sandbox Code Playgroud)
登录到root后,我输入以下命令:
[root@Dell Wani]# touch try.txt
[root@Dell Wani]# service sshd start
[root@Dell Wani]# scp try.txt Wani@localhost:~/
Wani@localhost's password:
Hello
[root@Dell Wani]#
Run Code Online (Sandbox Code Playgroud)
现在我登录Wani,输入:
[Wani@Dell ~]$ cat try.txt
cat: try.txt: No such file or directory
[Wani@Dell ~]$
Run Code Online (Sandbox Code Playgroud)
现在我再次登录root并输入相同的命令-v:
[root@Dell Wani]# scp -v morph.log Wani@localhost:
Executing: program /usr/bin/ssh host localhost, user Wani, command scp -v …Run Code Online (Sandbox Code Playgroud)