小编Mar*_*ryl的帖子

scp:使用特定的网卡

我试图通过特定的网卡执行 scp 。

我阅读了SCP 手册页,但找不到所需的标志。

networking ssh scp openssh

6
推荐指数
1
解决办法
3840
查看次数

在代码中通过 SSH 发送文件的协议是什么?

我正在阅读一些通过 SSH 客户端发送文件的 Go 代码。

https://github.com/tmc/scp/blob/master/scp.go#L33

它所做的一件事是将scp -t /remote/path. 那-t旗子是干什么用的?我做了一个man scp,但似乎没有记录。我在本地运行了命令,它的行为似乎像 cat。

scp -t远程运行后,代码会像这样将字节发送到服务器。

// Some special control header? What is this?
fmt.Fprintf(w, "C%#o %d %s\n", mode, size, fileName)
// Send file bytes.
io.Copy(w, contents)
// Send termination signal?
fmt.Fprint(w, "\x00")
Run Code Online (Sandbox Code Playgroud)

这个协议是什么?它在任何地方都有记录吗?

linux ssh scp

6
推荐指数
1
解决办法
738
查看次数

使用 sftp 连接到“FTP over TLS”

我现在已经浪费了一个多小时,我认为这应该很简单......

我有一个 azure 网站,它允许我使用 sftp 连接和部署到它。我可以使用 FileZilla 通过以下设置很好地连接到它:

  • 主机:Azure Portal 提供的主机
  • 端口:空
  • 协议:FTP - 文件传输协议
  • 加密:需要隐式 FTP over TLS
  • 登录类型:普通
  • 用户:Azure 门户提供的用户名
  • 密码:Azure 门户提供的密码。

不过,我不想使用 FileZilla 连接到它。我想使用命令行移动文件。我一直在尝试使用sftp,ftp并scp均无功而返。最后,他们都失败了:

$ sftp -v -oPort=990 user@xxxxx.ftp.azurewebsites.windows.net
OpenSSH_7.9p1, OpenSSL 1.0.2r  26 Feb 2019
debug1: Reading configuration data /home/rg/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 17: Applying options for *
debug1: Connecting to xxxxxxx.azurewebsites.windows.net [xxx.xxx.xxx.xxx] port 990.
debug1: Connection established.
debug1: identity file /home/rg/.ssh/id_rsa type 0
debug1: identity …
Run Code Online (Sandbox Code Playgroud)

ftp ssh sftp

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

SFTP 连接后如何 sudo 到管理员用户

sudo使用以下命令连接到 SFTP 服务器后,我需要用户“admin”。

sftp user@hostname
sftp> sudo su - admin
Invalid command.
Run Code Online (Sandbox Code Playgroud)

我还有其他方法可以使用吗sudo?

linux sftp su sudo

1
推荐指数
1
解决办法
849
查看次数

标签 统计

ssh ×3

linux ×2

scp ×2

sftp ×2

ftp ×1

networking ×1

openssh ×1

su ×1

sudo ×1