{"id":74,"date":"2008-01-25T18:10:30","date_gmt":"2008-01-26T01:10:30","guid":{"rendered":"\/\/?p=74"},"modified":"2008-01-25T18:14:56","modified_gmt":"2008-01-26T01:14:56","slug":"smb-connection-over-ssh","status":"publish","type":"post","link":"https:\/\/carson.fenimorefamily.com\/?p=74","title":{"rendered":"SMB connection over SSH"},"content":{"rendered":"<p>At one point, I wanted to connect from my MacBook Pro (using OS X Leopard 10.5.1) \u00a0to our OS X server&#8217;s Samba shares from off campus. \u00a0The only problem is that the server only allows SSH connections off campus. \u00a0This is all you need, however, to create a tunnel and connect to the windows shares. \u00a0 To create the tunnel, do<\/p>\n<blockquote class=\"webkit-indent-blockquote\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; border-style: none; padding: 0px\"><p>\u00a0sudo ssh user@servername -L localhost:139:servername:139\u00a0<\/p><\/blockquote>\n<p>The next part involves mounting the share, which Leopard won&#8217;t let you do from the Finder (it gives the error message &#8220;This file server is running on your machine. Please access the volumes and files locally.&#8221; ) \u00a0That&#8217;s ok, you can get around this by opening the terminal and typing the following commands:<\/p>\n<ol>\n<li>sudo mkdir \/Volumes\/sharename\u00a0<\/li>\n<li>sudo mount_smbfs \/\/username:password@localhost\/sharename \/Volumes\/sharename<\/li>\n<\/ol>\n<p>\u00a0Note that in my case I wanted to have a subdirectory on the share mounted, so in place of command 2 above, I typed (all one line):\u00a0\u00a0<\/p>\n<blockquote class=\"webkit-indent-blockquote\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; border-style: none; padding: 0px\"><p>sudo mount_smbfs \/\/username:password@localhost\/sharename\/subdir \/Volumes\/sharename\u00a0\u00a0<\/p><\/blockquote>\n<blockquote class=\"webkit-indent-blockquote\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; border-style: none; padding: 0px\"><p>\u00a0<\/p><\/blockquote>\n<p>And it worked! \u00a0I then used this share to do my backup using Time Machine. \u00a0Time Machine will let you backup to network shares if you type the following at the terminal (all one line):<\/p>\n<blockquote class=\"webkit-indent-blockquote\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; border-style: none; padding: 0px\"><p><span class=\"Apple-style-span\" style=\"font-family: 'Courier New'; font-size: 11px; line-height: 13px\">defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1&#8243; <\/span>\u00a0<\/p><\/blockquote>\n<blockquote class=\"webkit-indent-blockquote\" style=\"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; border-style: none; padding: 0px\"><p><span class=\"Apple-style-span\" style=\"font-family: 'Courier New'; font-size: 11px; line-height: 13px\"><span style=\"font-family: Georgia; font-size: 16px; line-height: 20px\" class=\"Apple-style-span\">\u00a0<\/span><\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>At one point, I wanted to connect from my MacBook Pro (using OS X Leopard 10.5.1) \u00a0to our OS X server&#8217;s Samba shares from off campus. \u00a0The only problem is that the server only allows SSH connections off campus. \u00a0This is all you need, however, to create a tunnel and connect to the windows shares. &hellip; <a href=\"https:\/\/carson.fenimorefamily.com\/?p=74\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SMB connection over SSH<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":0,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}