Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to SMB Server over command line

Tags:

macos

smb

What is the equivalent to "Connect To Server" on the mac for the command line?

Connect to Server

I would like to automate the process rather than summon the dialog every time I need to connect to a server.

like image 780
Helmut Granda Avatar asked Jan 04 '17 17:01

Helmut Granda


People also ask

What is an SMB connection?

Privacy policy. Thank you. On Windows servers, each connection uses the identity of a unique user to connect to another server by using an SMB (Server Message Block) connection. A connection is used when you open a remote file share in Windows Explorer or via a net use command.

What is SMB command in registry?

SMB Command Registry Keys. Introduction. On Windows servers, each connection uses the identity of a unique user to connect to another server by using an SMB (Server Message Block) connection. A connection is used when you open a remote file share in Windows Explorer or via a net use command.

How do I access an SMB share on Linux?

Accessing an SMB Share With Linux Machines. Linux (UNIX) machines can also browse and mount SMB shares. Note that this can be done whether the server is a Windows machine or a Samba server! An SMB client program for UNIX machines is included with the Samba distribution. It provides an ftp-like interface on the command line.

How do I connect my SMB drive to my computer?

Install SMB client 1.0 or CIFS client 1.0. You will then see the OK button. How Do I Connect To My Smb Drive? Please ensure that there are at least one or two shared folders on your Windows computer. Adding a connection to Documents on an iPad or iPhone requires you to tap the Plus button * Add Connection. Go to Windows SMB server and select it.


1 Answers

There are multiple ways to connect to remote server! I am assuming you have server running on windows OS. Mac OS X includes the SMB protocol for networking with Windows computers; some Linux and Unix systems can also share files with this protocol as well. You can easily mount a shared SMB volume using the mount command. Steps to be followed as below

1) mkdir /temp
2) chmod 777
3) mount -t smbfs //username@ip/nameOfSharefolder /temp

After this you can browse to/temp directory and browse

You can also use sshssh or ftp command to access the remote server but you need to run the ftp server in case of ftp command or remote access must be enable in case of ssh

like image 196
hrishikesh chaudhari Avatar answered Sep 30 '22 10:09

hrishikesh chaudhari