snipt

Ctrl+h for KB shortcuts

Bash

Change SSH port on OS X

1
2
3
4
5
# Add a service on an unused port in:
sudo vim /etc/services

# Change the string "ssh" below "SockServiceName" to whatever name used in the above file
sudo vim /System/Library/LaunchDaemons/ssh.plist
https://snippets.siftie.com/embed/7d7273436601ba72fdfd858fa8e2c103/
/raw/7d7273436601ba72fdfd858fa8e2c103/
7d7273436601ba72fdfd858fa8e2c103
bash
Bash
5
2019-04-15T13:13:16
True
False
False
/api/public/snipt/7733/
change-ssh-port-on-os-x
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># Add a service on an unused port in:</span> </span><span id="L-2"><a name="L-2"></a>sudo vim /etc/services </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1"># Change the string &quot;ssh&quot; below &quot;SockServiceName&quot; to whatever name used in the above file</span> </span><span id="L-5"><a name="L-5"></a>sudo vim /System/Library/LaunchDaemons/ssh.plist </span></pre></div> </td></tr></table>
osx, security, ssh