Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:17:16+00:00 2026-06-13T04:17:16+00:00

sshfs fails mounting if the remote host doesn’t support the local locale (LC_ALL). Goolge

  • 0

sshfs fails mounting if the remote host doesn’t support the local locale (LC_ALL). Goolge search pointed me to http://www.knoppixforum.de on how to handle this problem on bash.

But I need to call sshfs from python. The (failing) command looks like:

import subprocess
subprocess.check_call(['sshfs', 'HOST:~/SRC', '~/DST'])

An other search pointed me to ‘Set locale encoding in python’. And so I assumed it should look like:

import os, subprocess
env = os.environ.copy()
env['LC_ALL'] = 'en_US.UTF-8'
subprocess.check_call(['sshfs', 'HOST:~/SRC', '~/DST'], env = env)

But that doesn’t work neither. I reckon it fails because sshfs fork an new process for ssh which don’t adept my env variable?

Error message is always: remote host has disconnected

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:17:18+00:00Added an answer on June 13, 2026 at 4:17 am

    Haha, I fooled my self! My above approach does work. Except that ‘en_US.UTF-8’ is not available on the machine that I used for testing. During testing on bash I used ‘de_DE.UTF-8’ before.

    With LC_ALL=’C’ everything work like expected. So the right solution would be:

    import os, subprocess
    env = os.environ.copy()
    env['LC_ALL'] = 'C'
    subprocess.check_call(['sshfs', 'HOST:~/SRC', '~/DST'], env = env)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

local machine: Fedora 13 Subversion: 1.6.9 remote machine: CentSO 5.3 subversion 1.4.2 I have
I want to mount a remote directory using sshfs. sshfs working fine from terminal.
Hey guys, I have a remote fileserver that I use to host my music/movies.
We are mounting a filesystem over SSH using sshfs and are using it as
If I rsync a directory with some remote directory under an sshfs management, even
I have a share (on Machine-A) mounted via sshfs on Machine-B. From Machine-C, I
I'd like to login to a remote machine, and mount my home dir there
This is my code: //-- check for d/b; create it if it doesn't exist
I want to use sshfs to mount folders from my server to my laptop.
I'm using emacs over sshfs and a git repository. I enjoy using the git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.