相关疑难解决方法(0)

当.bashrc中的回声时SCP不起作用?

我在Fedora中有两个用户:

  1. root(非常明显!)

用户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)

ssh bash scp

73
推荐指数
4
解决办法
2万
查看次数

标签 统计

bash ×1

scp ×1

ssh ×1