AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 925409
Accepted
ArunMKumar
ArunMKumar
Asked: 2018-08-09 00:53:03 +0800 CST2018-08-09 00:53:03 +0800 CST 2018-08-09 00:53:03 +0800 CST

SCP 在文件传输开始前挂起

  • 772

我正在尝试使用非常基本的 scp 命令将文件从本地系统上的虚拟机(Ubuntu 18.04)移动到远程服务器。这个问题只出现在一个特定的服务器上,其他的工作正常,所以它不是一个通用的东西。

scp <file name> <user>@<complete_hostname>:~/

但是此命令不会继续进行成功的身份验证。

SCP Log: (from local machine, Ubuntu 18.04)
==========
debug1: Next authentication method: publickey
debug1: Offering public key: 
RSA SHA256:<key> /home/username/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: Authentication succeeded (publickey).
Authenticated to 'HOSTNAME' ([10.6.26.145]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_IN
debug1: Sending command: scp -v -r -d -t ~/received/


Form another  remote server:
debug1: Next authentication method: publickey
debug1: Trying private key: /home/username/.ssh/identity
debug1: Offering public key: /home/username/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/username/.ssh/id_dsa
debug1: Trying private key: /home/username/.ssh/id_ecdsa
debug1: Next authentication method: password
username@hostname's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = C
debug1: Sending env LC_ALL = C
debug1: Sending command: scp -v -t ~/

我在这些机器上没有任何特权访问权限,有没有办法找出问题所在?我需要做什么?

file-sharing
  • 3 3 个回答
  • 14073 Views

3 个回答

  • Voted
  1. Joshua Swain
    2021-04-29T04:29:23+08:002021-04-29T04:29:23+08:00

    对我来说,我要访问的目录scp不存在。

    我试图将文件发送到C:\Users\MyUser\AppData\AnotherDir\AnotherDir\. 一旦我将目标目录更改为C:\Users\MyUser\,它就起作用了。

    • 1
  2. Drakes
    2021-12-23T22:38:06+08:002021-12-23T22:38:06+08:00

    对于未来的读者,

    # This will use port 2222
    scp -v -P 2222 ~/local_file.txt admin@remote:~/dest
    

    但

    # This will use default port 22 and ignore your 2222
    scp -v ~/local_file.txt -P 2222 admin@remote:~/dest
    

    所以scp可能看起来像这样挂(错误的端口)。-v国旗是你的朋友。

    • 1
  3. Best Answer
    ArunMKumar
    2018-08-09T18:58:36+08:002018-08-09T18:58:36+08:00

    事实证明,这是一个阻止传输的防火墙。原因是我的默认 shell 的.*rc文件的文件权限。

    我的默认 shell 是 csh,文件权限是

    -rwxr-s---
    

    将这些更改为

    -rw-r-----
    

    解决了这个问题。

    • 0

相关问题

  • Windows 2008 中挂载点的配额和文件筛选问题

  • XP上奇怪的网络行为

  • 如何在客户端计算机上阻止 Finder 的“记住此密码”?

  • 在 VMPlayer 上 Windows 和 Linux 之间共享目录的最佳方式

  • 员工使用 Dropbox 存在哪些安全风险?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve