# Setting Up SSH and Locale Configuration on Proxmox

- Link: https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/
- Published: 2026-09-07T21:35:25+02:00
- Author: Manon Salsou

Table of contents

5mn read

 1.    [Method 1: SSH Key Authentication](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#method-1-ssh-key-authentication)
 2.   a.   [1. Generate SSH Key Pair on Client Machine](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#1-generate-ssh-key-pair-on-client-machine)
      b.   [2. Copy the Public Key to the Proxmox Server:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#2-copy-the-public-key-to-the-proxmox-server)
      c.   [3. Connect to the Server:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#3-connect-to-the-server)
      d.   [4. (Optional) Disable Password Authentication:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#4-optional-disable-password-authentication)
 3.    [Method 2: Password Authentication](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#method-2-password-authentication)
 4.   a.   [1. Edit the SSH Configuration:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#1-edit-the-ssh-configuration)
      b.   [2. Restart the SSH Service:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#2-restart-the-ssh-service)
      c.   [3. Connect to the Server:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#3-connect-to-the-server_1)
 5.    [Part 2 : Configuring Locale Settings](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#part-2-configuring-locale-settings)
 6.   a.   [1. Check Current Locale Settings:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#1-check-current-locale-settings)
      b.   [2. Install Locales Package:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#2-install-locales-package)
      c.   [3. Generate the Desired Locale:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#3-generate-the-desired-locale)
      d.   [4. Edit Locale Configuration:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#4-edit-locale-configuration)
      e.   [5. Update Locale Settings:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#5-update-locale-settings)
      f.   [6. Verify Locale Configuration:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#6-verify-locale-configuration)
      g.   [7. Restart the Server or Session:](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#7-restart-the-server-or-session)
 7.    [Troubleshooting: Fixing "-bash: warning: setlocale" Errors](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#troubleshooting-fixing-bash-warning-setlocale-errors)
 8.   a.   [Fix 1: Generate Missing Locales on the Server (Recommended)](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#fix-1-generate-missing-locales-on-the-server-recommended)
      b.   [Fix 2: Stop SSH Client from Forwarding Locales](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#fix-2-stop-ssh-client-from-forwarding-locales)
 9.    [Conclusion](https://blog.jouskaio.me/setting-up-ssh-and-locale-configuration-on-proxmox/#conclusion)

In this article, we will guide you through the process of setting up SSH access 
on a Proxmox server, including two methods for authentication: using SSH keys and
using a password. Additionally, we will cover how to configure the system locale
to ensure proper character encoding and language settings.

# Part 1: Setting Up SSH Access

## Method 1: SSH Key Authentication

Using SSH keys is a more secure method for authenticating to your server. Here’s
how to set it up:

### 1. Generate SSH Key Pair on Client Machine

Open a terminal on your local machine and run the following command:

    ```EnlighterJSRAW
    ssh-keygen -t rsa -b 2048
    ```

This will generate a public and private key pair. By default, the keys will be stored
in ⁠`~/.ssh/id_rsa` and ⁠`~/.ssh/id_rsa.pub`.

### 2. Copy the Public Key to the Proxmox Server:

Use the following command to copy your public key to the Proxmox server:

    ```EnlighterJSRAW
    ssh-copy-id username@your_proxmox_ip
    ```

Replace ⁠username with your actual username and ⁠your_proxmox_ip with the server’s
IP address.

### 3. Connect to the Server:

Now you can connect to your Proxmox server without a password:

    ```EnlighterJSRAW
    ssh username@your_proxmox_ip
    ```

### 4. (Optional) Disable Password Authentication:

For enhanced security, you can disable password authentication. Edit the SSH configuration
file:

    ```EnlighterJSRAW
    sudo nano /etc/ssh/sshd_config
    ```

Find the line ⁠PasswordAuthentication yes and change it to:

    ```EnlighterJSRAW
    PasswordAuthentication no
    ```

Restart the SSH service:

    ```EnlighterJSRAW
    sudo systemctl restart sshd
    ```

## Method 2: Password Authentication

If you prefer to use password authentication, follow these steps:

### 1. Edit the SSH Configuration:

Open the SSH configuration file:

    ```EnlighterJSRAW
    sudo nano /etc/ssh/sshd_config
    ```

Ensure the following line is set to ⁠yes:

    ```EnlighterJSRAW
    PasswordAuthentication yes
    ```

### 2. Restart the SSH Service:

Apply the changes by restarting the SSH service:

    ```EnlighterJSRAW
     sudo systemctl restart sshd
    ```

### 3. Connect to the Server:

Use the following command to connect to your Proxmox server:

    ```EnlighterJSRAW
    ssh username@your_proxmox_ip
    ```

You will be prompted to enter your password.

## Part 2 : Configuring Locale Settings

Proper locale settings are crucial for ensuring that your system can handle character
encoding correctly. Here’s how to configure the locale on your Proxmox server:

### 1. Check Current Locale Settings:

Run the following command to see your current locale settings:

    ```EnlighterJSRAW
    locale
    ```

### 2. Install Locales Package:

If you don’t have the locales package installed, you can install it with:

    ```EnlighterJSRAW
    sudo apt-get install locales
    ```

### 3. Generate the Desired Locale:

To properly generate and select your locales (e.g., French or English), run the 
interactive reconfigure tool:

    ```EnlighterJSRAW
    sudo dpkg-reconfigure locales
    ```

Use the arrow keys to navigate, the **Spacebar** to select your preferred locales(
e.g., `fr_FR.UTF-8 UTF-8 `and `en_US.UTF-8 UTF-8`), then press **Tab** to select
_OK_ and hit **Enter**. Finally, select your default system locale on the next screen.

Alternatively, you can generate a specific locale directly:

    ```EnlighterJSRAW
    sudo locale-gen fr_FR.UTF-8
    ```

### 4. Edit Locale Configuration:

Open the locale configuration file:

    ```EnlighterJSRAW
    sudo nano /etc/default/locale
    ```

Ensure it contains the following lines:

    ```EnlighterJSRAW
    LANG=fr_FR.UTF-8
    LANGUAGE=fr_FR:fr
    LC_ALL=fr_FR.UTF-8
    ```

### 5. Update Locale Settings:

Apply the changes by running:

    ```EnlighterJSRAW
    sudo update-locale
    ```

### 6. Verify Locale Configuration:

Check the locale settings again to ensure they are correct:

    ```EnlighterJSRAW
    locale
    ```

### 7. Restart the Server or Session:

For the changes to take effect, either restart your server or log out and log back
in.

## Troubleshooting: Fixing “-bash: warning: setlocale” Errors

When connecting via SSH, you might encounter warnings like this:

    ```EnlighterJSRAW
    -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
    -bash: warning: setlocale: LC_COLLATE: cannot change locale (fr_FR.UTF-): No such file or directory
    ```

This happens because your local SSH client automatically forwards its own language
environment variables to the remote Proxmox server, but the server doesn’t have 
those specific configuration files generated or encounters a malformed string.

You can fix this using one of two methods:

### Fix 1: Generate Missing Locales on the Server (Recommended)

Make sure the server supports the locales your client is trying to send. Run:

    ```EnlighterJSRAW
    sudo dpkg-reconfigure locales
    ```

Select the matching locale from the list (e.g., `fr_FR.UTF-8 UTF-8`), validate, 
and restart your SSH session.

### Fix 2: Stop SSH Client from Forwarding Locales

If you prefer not to alter the server settings, you can instruct your local machine’s
SSH client to stop sending your local environment variables to remote hosts.

On your **local machine** (Mac or Linux client), edit the SSH configuration file:

    ```EnlighterJSRAW
    sudo nano /etc/ssh/ssh_config
    ```

Locate the following line and comment it out by adding a `#` at the beginning:

    ```EnlighterJSRAW
    # SendEnv LANG LC_*
    ```

Save the file and reconnect. The warning will disappear.

## **Conclusion**

By following these steps, you can successfully set up SSH access on your Proxmox
server using either SSH keys or password authentication. Additionally, configuring
the locale—and knowing how to troubleshoot `setlocale` warnings—will ensure that
your server handles character encoding and language settings correctly. With these
configurations in place, your Proxmox server will be user-friendly.

---

## Newsletter

**Stay in the loop! ✨**

 

Subscribe to my newsletter to get my latest updates, new articles, and thoughts 
on tech, projects, and what I’m building.

Name

Firstname

Email

I accept the privacy policy
