Here's a neat OpenSSH trick for accessing an AFP fileshare remotely (and securely).
In Mac OS X, open a terminal window and type:
$ ssh -l [username] [servername] -L 10548:127.0.0.1:548 sleep 3000
Replace [username] and [servername] with your username on the server that you are trying to connect to. The -L parameter controls port bindings. What we are doing with these options is binding the remote AFP server (the remote port 548) to port 10548 on server 127.0.0.1 (the localhost), with all communication happening over SSH (port 22).
In Mac OS X, open a terminal window and type:
$ ssh -l [username] [servername] -L 10548:127.0.0.1:548 sleep 3000
Replace [username] and [servername] with your username on the server that you are trying to connect to. The -L parameter controls port bindings. What we are doing with these options is binding the remote AFP server (the remote port 548) to port 10548 on server 127.0.0.1 (the localhost), with all communication happening over SSH (port 22).
Continue reading Tunneling AFP over SSH.
