this post was submitted on 11 Nov 2023
84 points (100.0% liked)
Gaming
30561 readers
30 users here now
From video gaming to card games and stuff in between, if it's gaming you can probably discuss it here!
Please Note: Gaming memes are permitted to be posted on Meme Mondays, but will otherwise be removed in an effort to allow other discussions to take place.
See also Gaming's sister community Tabletop Gaming.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
There are plenty on the web (for instance on handheld.quest), but I haven't found a single one that contains all details...
So, I'll just try to sum up the details here:
First things first: SSH stands for Secure Shell, and is basically an encrypted remote command line, but it offers much more features than just a command line, including, but not limited to, file transfer. The file transfer feature is also known as sftp, and generally considered to be the successor of the more well known ftp protocol.
The very first thing I would do on the Steam Deck would be to set a host name in the settings, such that you don't need to use the IP address to address it over the network. Screenshot (I totally haven't just found by googling).
The Steam Deck comes with an SSH server pre-installed, you need to enable it though. The following steps need to be done on a terminal, in desktop mode. The terminal that's installed on the Steam Deck is called "Konsole" (if I remember correctly). Once you have a terminal running on Desktop Mode, you can enable the SSH server via the following steps (I'll link the help for all commands I mention, so that you can verify that I'm not trying to trick you into doing something bad):
passwd
. While typing the password, there won't be any feedback on the screen. This is normal.sudo
command to run other commands as administrator.sudo
will ask you to confirm your identity by entering the password.sudo systemctl start sshd
. Help files:systemctl
,sshd
sudo systemctl stop sshd
.sudo systemctl enable sshd
(but I would not recommend this unless you disable password based logins - see below)sudo systemctl disable sshd
On the PC from which you want to connect to the Deck you will need some kind of sftp client. On Linux most file managers have sftp functionality built-in. On Windows and MacOS one needs a special program for this though (afaik). There are many, many alternatives here (just search "sftp client" in your search engine of choice), but the most well known one is FileZilla, which works on Windows, macOS, Linux and many other operating systems. I recommend FileZilla for two reasons. The first is that it's open source (and free of charge), the second one is that I personally like it as a tool. At work I (have to) use Windows, and whenever I have to transfer files to a remote system like our webservers, our contractor's cloud storage, or simply to copy a few music files from my phone to the office PC (yes, I am this old), FileZilla is the go-to solution for me.
If you have started the SSH server on the deck, you should now be able to access its contents via sftp. The default user on the Steam Deck is called
deck
, the password is the one you set earlier using thepasswd
command. If you are lost using FileZilla, there's a user's guide online.Now, as promised, a few words on security and autostarting the SSH server. If you plan on auto-starting the SSH server on the Steam Deck, I would recommend to set up a means to connect to it without a password, and then to disable password-based SSH connections. The reason is that the Steam Deck, as a mobile device, will quite likely end up in insecure or otherwise untrusted wireless networks, and passwords are really not the most secure way of user authentication... Since SSH is a full remote access protocol, anyone who guesses your password and can reach the deck over the network could do anything on it. Given that the deck's battery runtime is already short enough even if there is no bitcoin miner running in the background, you probably don't want password based logins via SSH enabled permanently.
That's where Public-key authentication comes in. You can configure the SSH server to allow users to connect without a password, if the users have access to a private key for which the corresponding public key is known to the server. To enable this, all you need to do is to create a public/private SSH key pair, and upload the public key to the SSH server on the Steam Deck. The exact process of creating those keys is again depending on the operating system. Here's a guide about SSH key generation that includes instructions for macOS and Windows. On macOS or Linux the instructions are actually identical. You just need to open a terminal, and, if they don't exist for your user yet, run
ssh-keygen
to create the keys. Then you can usessh-copy-id
to upload the public key to the Steam Deck. Once that is done, if your system usesssh-agent
, connecting via public key should "just work" - also in FileZilla. If you don't use ssh-agent, you can try these steps in FileZilla.Once you have confirmed that passwordless public-key logins are working, you can edit the file /etc/ssh/sshd.conf on the steam deck. You'll need admin access, so the easiest way to do that is probably to run
sudo nano /etc/ssh/sshd.conf
on a terminal (nano help). The relevant change is to replace the line#PasswordAuthentication yes
byPasswordAuthentication no
(here's the help file for sshd.conf). In order to apply these changes, you probably need to restart the SSH server:sudo systemctl restart sshd
.