更新Azure函数中Linux(Ubuntu)的SSH密码

发布于 2025-02-09 21:28:23 字数 230 浏览 2 评论 0 原文

我创建了一个Azure功能,可以通过SSH连接到SFTP服务器。唯一的问题似乎是SSH在Ubuntu 20.04.4 LTS操作系统上不支持所需的SSH密码,而Azure函数正在运行。因此,我想知道是否有一种方法可以将SSH密码更新为该操作系统上的Azure功能所需的密码(不使用Docker Hub)?

我在某个地方阅读了您可以编辑/etc/ssh/sshd_config完成此操作的地方除非我误会,否则Azure功能的上下文)?

I have created an Azure Function to connect to an SFTP server via SSH. The only problem appears to be that needed SSH ciphers are not supported by SSH on the Ubuntu 20.04.4 LTS operating system that the Azure Function is running on. So I'd like to know if there's a way to update the SSH ciphers to the ones I need for the Azure Function on that operating system (without using Docker Hub)?

I read somewhere that you can edit /etc/ssh/sshd_config to get this done, but if that's the way forward, then how is it done (bear in mind that I don't think I have direct access to the operating system in the context of the Azure Function unless I'm mistaken)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只为一人 2025-02-16 21:28:23

是的,您听到了正确的消息,需要编辑编辑/etc/ssh/sshd_config 才能完成此操作。您可以使用CIPHERS关键字在配置文件中配置加密算法;默认值为' anystdcipher '。

执行以下步骤:

1.in/etc/sssh/sshd_config(server)和/etc/etc/ssh/ssh_config(client),搜索密码。以下是默认配置:

复制

#Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc

2.汇总此行,然后用以下值替换:

复制

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc

3.Restart SSH通过运行Service SSHD RESTART命令。

参考:

Yes you heard it correct you need to edit edit /etc/ssh/sshd_config to get this done.You can configure encryption algorithms in the configuration file using the Ciphers keyword; the default is 'AnyStdCipher'.

Perform the following steps:

1.In /etc/ssh/sshd_config (server) and /etc/ssh/ssh_config (client), search for Ciphers. The following is the default configuration:

Copy

#Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc

2.Uncomment this line and replace it with the following value:

Copy

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc

3.Restart SSH by running the service sshd restart command.

reference : https://www.netiq.com/documentation/access-manager-45/security-guide/data/ssh-ciphers.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文