Azure – SFTP connection from Azure service to Azure blob [closed]

I wrote a tool in C# that (among other things) downloads a file using an SFTP connection. This tool seems to work fine for most connections, but recently caused an error while downloading a file from an Azure blob storage SFTP connection. While debugging I noticed that the tool is working fine on my local machine, the error only occurs when running on an Azure service.

For debugging reasons I tried to make the SFTP connection using the command line. While this works fine on my local machine, this also gives an error on the Azure instance. I tried different sftp options, using both ssh-password and ssh-key authentication, but without any effect. The tool is running on an Azure App Service (web app) but I also tested on a Cloud Service (extended support).

Unfortunately I am not the owner of the Azure blob container, but I have contact with the owner. The blob is set to have network access from selected virtual networks and IP-addresses only. Both my own IP-address and all my Azure outgoing IP-addresses (the Azure App Service has multiple) are added to the whitelist. I did check if the outgoing IP is actually one of the listed IP’s (using curl ifcfg.me) and it is indeed one of the listed IP’s.

On my local machine, the SFTP connection is created without any problems:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
Connected to <instance>.<container>.<username>@<instance>.blob.core.windows.net.
sftp>

On the Azure App service (web app, using Kudu console), the output is as follows:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
ssh: connect to host <instance>.blob.core.windows.net port 22: Permission denied
Connection closed

On the Azure Cloud service (extended support), the output is as follows:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
Received disconnect from <IP> port 22:11:  - RequestId:cb9ebcf7-501e-0002-158a-d7c372000000 Time:2024-07-17T14:16:52.5853865Z
Disconnected from <IP> port 22
Connection closed

When I try to connect from my local machine over an IP-address that is not whitelisted (using VPN) the error is the same as on the Azure Cloud service (Received disconnect).

My guess is that the connection is blocked on the Azure blob. I did a TCP connection test (using self support in the Azure portal) to <instance>.blob.core.windows.net:22 from the Azure App service, as this succeeded I guess the outgoing connection/port is open.

Does anyone have any experience with SFTP connections from an Azure service to an Azure blob? Or any experience with this error on another platform (not 100% sure if it is Azure related)?

New contributor

user26409784 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Azure – SFTP connection from Azure service to Azure blob [closed]

I wrote a tool in C# that (among other things) downloads a file using an SFTP connection. This tool seems to work fine for most connections, but recently caused an error while downloading a file from an Azure blob storage SFTP connection. While debugging I noticed that the tool is working fine on my local machine, the error only occurs when running on an Azure service.

For debugging reasons I tried to make the SFTP connection using the command line. While this works fine on my local machine, this also gives an error on the Azure instance. I tried different sftp options, using both ssh-password and ssh-key authentication, but without any effect. The tool is running on an Azure App Service (web app) but I also tested on a Cloud Service (extended support).

Unfortunately I am not the owner of the Azure blob container, but I have contact with the owner. The blob is set to have network access from selected virtual networks and IP-addresses only. Both my own IP-address and all my Azure outgoing IP-addresses (the Azure App Service has multiple) are added to the whitelist. I did check if the outgoing IP is actually one of the listed IP’s (using curl ifcfg.me) and it is indeed one of the listed IP’s.

On my local machine, the SFTP connection is created without any problems:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
Connected to <instance>.<container>.<username>@<instance>.blob.core.windows.net.
sftp>

On the Azure App service (web app, using Kudu console), the output is as follows:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
ssh: connect to host <instance>.blob.core.windows.net port 22: Permission denied
Connection closed

On the Azure Cloud service (extended support), the output is as follows:

sftp -i <key-file> <instance>.<container>.<username>@<instance>.blob.core.windows.net
Received disconnect from <IP> port 22:11:  - RequestId:cb9ebcf7-501e-0002-158a-d7c372000000 Time:2024-07-17T14:16:52.5853865Z
Disconnected from <IP> port 22
Connection closed

When I try to connect from my local machine over an IP-address that is not whitelisted (using VPN) the error is the same as on the Azure Cloud service (Received disconnect).

My guess is that the connection is blocked on the Azure blob. I did a TCP connection test (using self support in the Azure portal) to <instance>.blob.core.windows.net:22 from the Azure App service, as this succeeded I guess the outgoing connection/port is open.

Does anyone have any experience with SFTP connections from an Azure service to an Azure blob? Or any experience with this error on another platform (not 100% sure if it is Azure related)?

New contributor

user26409784 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật