我创建了一个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)?
发布评论
评论(1)
是的,您听到了正确的消息,需要编辑
编辑/etc/ssh/sshd_config
才能完成此操作。您可以使用CIPHERS关键字在配置文件中配置加密算法;默认值为'anystdcipher
'。执行以下步骤:
1.in/etc/sssh/sshd_config(server)和/etc/etc/ssh/ssh_config(client),搜索密码。以下是默认配置:
复制
2.汇总此行,然后用以下值替换:
复制
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
2.Uncomment this line and replace it with the following value:
Copy
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