Score:0

Changing the default port without editing /etc/ssh/sshd_config

nl flag

The standard way to change ports, of course, is to edit /etc/ssh/sshd_config. Since I'd really like to avoid messing with the vanilla ubuntu to the greatest extent possible,I'd prefer if it is possible to change the port by putting a Port line in, for example, ~/.ssh/config. I've tried doing this, but to no avail. I've also tried putting a customized copy of sshd_config in that directory, which also didn't work. Can anybody suggest some way to change ports without touching any files owned by root?

Thanks!

Terrance avatar
id flag
Are you trying to connect to a different port on another server? Or are you trying to change the port on your computer that happens to be a ssh server as well? The `sshd_config` deals with the server side and the `.ssh/config` deals with the client side.
nl flag
It's the server side that matters for me. I have a few machines on the same LAN, and I ssh back and forth between them, each has it's own port, hopefully adding a security layer. It sounds like I don't have any choice but to mess with the /etc directory? I've had bad experiences whenever I play root.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.