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
    • 最新
    • 标签
主页 / computer / 问题

问题[sftp](computer)

Martin Hope
user2660278
Asked: 2024-11-25 20:05:49 +0800 CST

GIO 安装 SFTP 区分大小写,名称是否转换为小写?

  • 6

我正在使用 GIO 挂载名称包含大写字符的 SFTP 路径。这似乎失败了,错误消息中输入的名称似乎已转换为小写。

完整命令是gio mount sftp://FOO,错误信息是:

gio: sftp://foo/: Connection failed

注意大小写的变化。

这是一个错误,还是我错过了一些路径必须不区分大小写的标准?

我遇到过这种情况,我配置了一个 SSH 服务器~/.ssh/config,并且Host名称包含大写字符。我试图通过 GNOME Files 对其进行 SFTP 挂载。将使用的名称Host全部更改为小写字符解决了我的问题。

如果您想亲自尝试,以下是使用 Docker 的最小设置:

docker run -it --rm ubuntu:24.04 bash

apt-get update
apt-get install dbus ssh gvfs-backends libglib2.0-bin

dbus-run-session bash

gio mount sftp://FOO
sftp
  • 1 个回答
  • 31 Views
Martin Hope
Pietro
Asked: 2024-09-05 01:37:48 +0800 CST

如何下载远程目录列表而不下载其内容?

  • 5

我必须从远程目录自动下载一个我只知道部分名称的文件(例如“file-vers.1.2.3.zip”,其中版本号是未知部分)。

由于 和 都不wget接受curl路径中的 '*' 特殊字符,我想我需要先下载目录内容(相当于ls或dir),解析它,提取我需要的文件名,检查它的版本是否比我已经拥有的版本更新,然后将它传递给wget或curl。

如果没有比这更快的方法,我的问题是:如何从 HTTPS 和 SFTP 存储库下载目录内容?

sftp
  • 1 个回答
  • 57 Views
Martin Hope
dan178
Asked: 2022-09-03 13:05:18 +0800 CST

我是否需要 RSA 私钥才能使用 SFTP 和 .NET 的 SSH.NET 库上传文件?

  • 5

我是否必须拥有 rsa 私钥,或者是否可以使用用户名和密码?

我问是因为对 .NET 的 SSH.NET 库的解释:

“使用密码和公钥身份验证建立 SFTP 连接:”

是否有必要或者我可以使用其中一种吗?

我的问题是:是否需要我有一个私钥才能使用 SFTP 将文件上传到服务器,还是用户名/密码就足够了?

ssh sftp
  • 1 个回答
  • 29 Views
Martin Hope
oldpride
Asked: 2022-09-02 10:07:02 +0800 CST

如何在 Linux 上减慢 sftp

  • 5

我在托管公司维护一个社区网站。每两周一次,我需要将备份下载到我的家庭 Linux 主机作为异地备份。备份总共大约 110M 字节。否则我的网站是空闲的。

我使用 sftp 下载。此下载会在托管公司中触发警报:IO 或网络超出限制。限制为每秒 5M 字节或位。然后托管公司会自动关闭我的网站。

我的 sftp 命令非常通用

sftp myname@mysite <<EOF
   get -p file1_100M
   get -p file2_5M
EOF

我看到很多关于加快文件传输的帖子。我的目标实际上是尽可能地减慢它的速度。

我的 Linux 是 Ubuntu 18。托管公司还在带有标准 C 面板的 LAMP 堆栈(Linux Apache MySQL PHP)中使用 Linux。

linux sftp
  • 1 个回答
  • 19 Views
Martin Hope
Steve.
Asked: 2022-06-15 02:33:17 +0800 CST

如果我想在 ftp/sftp 上创建一个目录,我的计算机作为没有云托管的主机,是否可以?

  • 5

我最近才发现这个 sftp/ftp 的东西,我们是否有可能创建一个目录,我们可以在另一台计算机上使用 filezilla 或其他类似的应用程序连接到我的家用电脑作为服务器。

那些服务器也是计算机,所以也许我认为我们的家用电脑作为服务器这可能有用吗?

ftp sftp
  • 1 个回答
  • 22 Views
Martin Hope
Júlio Pradera
Asked: 2022-06-01 23:28:05 +0800 CST

密钥在 Sublime SFTP 中被拒绝,但在 PuTTY 中有效

  • 6

几年来,我一直在使用 Sublime Text 上的 SFTP 包连接到 AWS EC2 实例,但从未遇到任何问题。今天我创建了一个新实例,由于某种原因我无法连接到它。

当我尝试连接到任何其他实例时,连接有效。当我尝试使用 PuTTY 连接时,连接也有效。只有当我尝试通过 Sublime Text 连接时才会出现问题。

sftp-config.json:

{
    "type": "sftp",

    "save_before_upload": true,
    "upload_on_save": true,
    "sync_down_on_open": true,
    "sync_skip_deletes": false,
    "sync_same_age": true,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,

    "host": "00.000.000.000",
    "user": "<Username>",
    "port": "22",

    "remote_path": "/var/www/html/",
    "ignore_regexes": [
        "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
        "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
        "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
    ],
    "file_permissions": "755",
    "dir_permissions": "755",

    "connect_timeout": 30,
    "ssh_key_file": "C:/AWS Key Pairs.ppk",
}

崇高的控制台:

Connecting to SFTP server "00.000.000.000" as "<Username>" ........... failure (Connection timeout)

sublime_sftp_debug.txt:

2022-06-01 00:12:19, SFTP Read:
    Using username "<Username>".
    Server refused our key
    FATAL ERROR: No supported authentication methods available (server sent: publickey)

远程服务器的 auth.log:

Jun  1 04:12:18 ip-000-00-00-000 sshd[59492]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
Jun  1 04:12:18 ip-000-00-00-000 sshd[59492]: Connection closed by authenticating user <Username> 00.00.000.00 port 49161 [preauth]

有谁碰巧知道为什么会出现这个问题?在此错误之前,出现了另一个关于 PuTTYgen 生成的密钥版本的错误。生成私钥时可能是其他一些配置,但我已经尝试过几个不同的教程,但都没有奏效。

ssh sftp
  • 1 个回答
  • 219 Views
Martin Hope
barlop
Asked: 2022-05-28 19:36:31 +0800 CST

是否可以映射为网络驱动器,我 SFTP 到的服务器?

  • 5

是否可以映射为网络驱动器,我 SFTP 到的服务器?

例如 FileZilla 或 WinSCP(支持 SFTP)可以让您浏览您 SFTP 到的服务器。但我想将驱动器号映射到它。

windows sftp
  • 2 个回答
  • 982 Views
Martin Hope
barlop
Asked: 2022-05-28 17:54:14 +0800 CST

无法让 SSHFS Win Manager 连接到 SSH/SFTP 服务器

  • 5

我已经设置了一些由 digitalocean 托管的虚拟机/VPS(“数字海洋水滴”)。我可以通过 SSH 连接到他们,这意味着我可以进行 SFTP。

与 SFTP 客户端连接一切都很好,例如 FileZilla 客户端(或支持 SFTP 的 WinSCP 客户端),但我想将一些虚拟机的驱动器映射到我的 windows 计算机上的驱动器号。

我对此进行了谷歌搜索,并提出了适用于 Windows 的 SSHFS Win Manager。https://sftptogo.com/blog/how-to-map-sftp-as-a-windows-10-drive/ (虽然我在 Windows 7 上)。我不知道它是否不是很多人使用的程序,这可能解释了一些事情。

我无法获得适用于 Windows 的 SSHFS,以连接到 SSH/SFTP 服务器。

在此处输入图像描述

我可以从 cygwin SSH 到它

(文件“bleh”只是私钥 id_rsa 的副本)

$ ssh -i ~/.ssh/bleh user@164.... 

FileZilla 也很好。

但是 SSHFS Win Manager 连接不上。设置似乎一切正常。

在此处输入图像描述

windows sftp
  • 2 个回答
  • 659 Views
Martin Hope
Darwin
Asked: 2022-05-15 19:46:06 +0800 CST

在 WinSCP 中使用“sudo su”shell 连接时出现“跳过启动消息时出错”

  • 6

我的 WinSCP 配置:

File protocol: SCP
user name: namjoo
port: 22
settings > SCP/Shell > Shell:   sudo su -

当我尝试连接时,出现此错误:

跳过启动消息时出错。您的 shell 可能与应用程序不兼容(推荐使用 BASH)。

我的日志文件是:

root@hostname:~# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-05-14 17:21:37 UTC; 1h 36min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 2519 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 2532 (sshd)
      Tasks: 1 (limit: 19062)
     Memory: 3.1M
     CGroup: /system.slice/ssh.service
             └─2532 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

May 14 18:17:25 hostname sshd[2905]: pam_unix(sshd:session): session closed for user my_username
May 14 18:18:00 hostname sshd[2995]: Accepted password for my_username from 192.168.1.151 port 60242 ssh2
May 14 18:18:00 hostname sshd[2995]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:18:01 hostname sshd[2995]: pam_unix(sshd:session): session closed for user my_username
May 14 18:20:40 hostname sshd[3112]: Accepted password for my_username from 192.168.1.151 port 60495 ssh2
May 14 18:20:40 hostname sshd[3112]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:20:41 hostname sshd[3112]: pam_unix(sshd:session): session closed for user my_username
May 14 18:58:16 hostname sshd[3233]: Accepted password for my_username from 192.168.1.151 port 64655 ssh2
May 14 18:58:16 hostname sshd[3233]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:58:17 hostname sshd[3233]: pam_unix(sshd:session): session closed for user my_username

我的用户是my_username. 我最近安装了它。WinSCP 日志文件内容:

. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.067 WinSCP Version 5.17.10 (Build 11087) (OS 10.0.19043 - Windows 10 Enterprise)
. 2022-05-15 19:57:10.067 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2022-05-15 19:57:10.067 Log level: Normal
. 2022-05-15 19:57:10.067 Local account: WIN\namjoo
. 2022-05-15 19:57:10.067 Working directory: C:\Program Files (x86)\WinSCP
. 2022-05-15 19:57:10.067 Process ID: 5692
. 2022-05-15 19:57:10.067 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
. 2022-05-15 19:57:10.067 Time zone: Current: GMT+4:30, Standard: GMT+3:30 (Iran Standard Time), DST: GMT+4:30 (Iran Daylight Time), DST Start: 3/22/2022, DST End: 9/21/2022
. 2022-05-15 19:57:10.067 Login time: Sunday, May 15, 2022 7:57:10 PM
. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.067 Session name: [email protected] (Site)
. 2022-05-15 19:57:10.067 Host name: 192.168.1.150 (Port: 22)
. 2022-05-15 19:57:10.067 User name: namjoo (Password: No, Key file: No, Passphrase: No)
. 2022-05-15 19:57:10.067 Tunnel: No
. 2022-05-15 19:57:10.067 Transfer Protocol: SCP
. 2022-05-15 19:57:10.067 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2022-05-15 19:57:10.067 Disable Nagle: No
. 2022-05-15 19:57:10.067 Proxy: None
. 2022-05-15 19:57:10.067 Send buffer: 262144
. 2022-05-15 19:57:10.067 SSH protocol version: 2; Compression: No
. 2022-05-15 19:57:10.067 Bypass authentication: No
. 2022-05-15 19:57:10.067 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2022-05-15 19:57:10.067 GSSAPI: Forwarding: No; Libs: gssapi32,sspi,custom; Custom: 
. 2022-05-15 19:57:10.067 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2022-05-15 19:57:10.067 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2022-05-15 19:57:10.067 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2022-05-15 19:57:10.067 Simple channel: Yes
. 2022-05-15 19:57:10.067 Return code variable: Autodetect; Lookup user groups: Auto
. 2022-05-15 19:57:10.067 Shell: sudo su -
. 2022-05-15 19:57:10.067 EOL: LF, UTF: Auto
. 2022-05-15 19:57:10.067 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2022-05-15 19:57:10.067 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2022-05-15 19:57:10.067 Local directory: default, Remote directory: /var/www/lichens, Update: Yes, Cache: Yes
. 2022-05-15 19:57:10.067 Cache directory changes: Yes, Permanent: Yes
. 2022-05-15 19:57:10.067 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2022-05-15 19:57:10.067 DST mode: Unix;Timezone offset: 0h 0m
. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.120 Looking up host "192.168.1.150" for SSH connection
. 2022-05-15 19:57:10.120 Connecting to 192.168.1.150 port 22
. 2022-05-15 19:57:10.136 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2022-05-15 19:57:10.136 Remote version: SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
. 2022-05-15 19:57:10.136 Using SSH protocol version 2
. 2022-05-15 19:57:10.136 Have a known host key of type ssh-ed25519
. 2022-05-15 19:57:10.152 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2022-05-15 19:57:10.276 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2022-05-15 19:57:10.276 Host key fingerprint is:
. 2022-05-15 19:57:10.276 ssh-ed25519 255 65:d6:2c:01:60:77:9b:bc:e3:71:b0:92:00:ee:32:88 obPgbW2b75UCCFNcIELRozzTRqFSbLNRNOccK63VtTE=
. 2022-05-15 19:57:10.338 Host key matches cached key
. 2022-05-15 19:57:10.338 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2022-05-15 19:57:10.338 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2022-05-15 19:57:10.338 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2022-05-15 19:57:10.338 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2022-05-15 19:57:10.338 Using username "namjoo".
. 2022-05-15 19:57:10.369 Server offered these authentication methods: publickey,password
. 2022-05-15 19:57:10.369 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2022-05-15 19:57:14.784 Sent password
. 2022-05-15 19:57:14.810 Access granted
. 2022-05-15 19:57:14.810 Opening main session channel
. 2022-05-15 19:57:15.576 Opened main channel
. 2022-05-15 19:57:15.576 Started a shell/command
. 2022-05-15 19:57:15.607 --------------------------------------------------------------------------
. 2022-05-15 19:57:15.607 Using SCP protocol.
. 2022-05-15 19:57:15.607 Doing startup conversation with host.
. 2022-05-15 19:57:15.623 Skipping host startup message (if any).
> 2022-05-15 19:57:15.623 echo "WinSCP: this is end-of-file:0"
! 2022-05-15 19:57:15.623 sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
. 2022-05-15 19:57:15.623 Session sent command exit status 1
. 2022-05-15 19:57:15.623 Main session channel closed
. 2022-05-15 19:57:15.623 All channels closed
. 2022-05-15 19:57:15.623 Attempt to close connection due to fatal exception:
* 2022-05-15 19:57:15.623 **Connection has been unexpectedly closed.** Server sent command exit status 1.
. 2022-05-15 19:57:15.623 Closing connection.
* 2022-05-15 19:57:15.652 (EFatal) **Connection has been unexpectedly closed.** Server sent command exit status 1.
* 2022-05-15 19:57:15.652 Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).

cat /etc/sudoers:

root    ALL=(ALL:ALL) ALL
darwin  ALL=NOPASSWD:ALL
namjoo  ALL=NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
ubuntu sftp
  • 2 个回答
  • 1093 Views
Martin Hope
Adrian
Asked: 2022-04-05 06:22:01 +0800 CST

来自世界各地的大量失败的身份验证请求在全新的 GGL 云 SFTP 服务器上

  • 5

我创建了我的第一个公共服务器——托管在谷歌云上的 SFTP 服务器。我在测试的第二天检查了身份验证日志,发现我每分钟都会从随机人那里得到 4-10 次点击!16 小时内有 3700 个请求失败 - 这看起来很荒谬,所以我想知道是否有任何方法可以阻止它们。我对防火墙的经验几乎为零 - 我希望避免默认拒绝所有人并且只允许列入白名单的 IP,但也许我必须考虑一下。

Apr  4 13:34:05 nfp sshd[12034]: Failed password for invalid user tjkim from 134.122.9.249 port 48930 ssh2
Apr  4 13:34:13 nfp sshd[12107]: Failed password for invalid user barman from 198.58.119.132 port 39626 ssh2
Apr  4 13:34:16 nfp sshd[12119]: Failed password for invalid user rscreen from 203.205.37.233 port 33740 ssh2
Apr  4 13:34:16 nfp sshd[12121]: Failed password for invalid user oakda from 164.90.194.36 port 41566 ssh2
Apr  4 13:34:18 nfp sshd[12123]: Failed password for invalid user lia from 43.130.60.190 port 46610 ssh2
Apr  4 13:34:20 nfp sshd[12125]: Failed password for invalid user hongphong from 193.106.60.145 port 33020 ssh2
Apr  4 13:34:23 nfp sshd[12127]: Failed password for invalid user uucpsh from 157.245.101.31 port 59112 ssh2
Apr  4 13:34:27 nfp sshd[12129]: Failed password for invalid user legaltech from 43.154.249.125 port 33970 ssh2
Apr  4 13:34:51 nfp sshd[12132]: Failed password for invalid user dhamu from 164.90.198.71 port 36212 ssh2
Apr  4 13:34:57 nfp sshd[12134]: Failed password for invalid user onapp from 115.182.105.68 port 46286 ssh2

对新手有什么指导吗?

google-cloud-platform sftp
  • 2 个回答
  • 200 Views

Sidebar

Stats

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

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve