New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Connecting to server from Terminal in Lion


Post Reply New Thread Subscribe

 
Thread Tools
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
Hello everyone, I was wondering what I need to type into terminal to connect to my server. I was only able to find one command and it doesn't seem to work. I have two Linux Ubuntu 11.10 (latestest version) servers and can connect to neither. Thanks in advance.

Here is the command I have been using. ssh username@server name.***.***.***.***
^^IP address^^

I MISS SNOW LEOPARD ;(
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
This all depends how you're trying to connect - what protocol are you connecting over? From the looks of it, you're trying to connect over SSH which is only going to work if the ssh daemon is started and configured on the Ubuntu box.

Second, you don't need the server name and the IP - stick with just the IP:
Code:
ssh username@<IP>

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
Quote:
Originally Posted by vansmith View Post
This all depends how you're trying to connect - what protocol are you connecting over? From the looks of it, you're trying to connect over SSH which is only going to work if the ssh daemon is started and configured on the Ubuntu box.

Second, you don't need the server name and the IP - stick with just the IP:
Code:
ssh username@<IP>
Well, If I'm not mistaken my network is dhcp, but I tried that in place of ssh and got a command not found so i switched back to the ssh thing at the beginning. I would I start/congifure the ssh on the ubuntu box? or is that not what I need to do with the dhcp network setting?

I MISS SNOW LEOPARD ;(
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
Where did you get the command not found?

How did you install Ubuntu? Usually when you do an install from a disc it installs the desktop version of Ubuntu - which doesn't provide most of the server stuff like ssh.
Enable Secure Shell (SSH) in Ubuntu 11.04 Natty Narwhal | Liberian Geek

Note that if you expose ssh to the internet (i.e. open it in your firewall - you will be brute-forced attacked but scripts constantly) If you are just trying to access your computer internally behind your firewall - it should be fine to use passwords.

ssh username@ip should work fine. The first one you tried I wouldn't expect to work.
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
Quote:
Originally Posted by IvanLasston View Post
Where did you get the command not found?

How did you install Ubuntu? Usually when you do an install from a disc it installs the desktop version of Ubuntu - which doesn't provide most of the server stuff like ssh.
Enable Secure Shell (SSH) in Ubuntu 11.04 Natty Narwhal | Liberian Geek

Note that if you expose ssh to the internet (i.e. open it in your firewall - you will be brute-forced attacked but scripts constantly) If you are just trying to access your computer internally behind your firewall - it should be fine to use passwords.

ssh username@ip should work fine. The first one you tried I wouldn't expect to work.
I installed it via USB, but it is the server version that doens't include the desktop environment. Essentially it's just the command line though a desktop mode can be enabled I believe . I tried ssh username@ip but it just adnvances the cursor to the next line. I'll try logging off the server and then see if that helps.

I MISS SNOW LEOPARD ;(
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Quote:
Originally Posted by 19birel View Post
Well, If I'm not mistaken my network is dhcp, but I tried that in place of ssh and got a command not found so i switched back to the ssh thing at the beginning. I would I start/congifure the ssh on the ubuntu box? or is that not what I need to do with the dhcp network setting?
DHCP is not a connection protocol but a method of allocating IPs to clients. It has nothing to do with shares beyond giving machines on the network an IP address.

Ubuntu Server doesn't install SSH by default unless you explicitly select it during install (actually, I'm not even sure if it's an option - it's been a while since I installed it on my server). If you don't have it installed and configured, take a look at the Ubuntu server docs here. That's for version 11.10 - replace the version number in the URL with your version if you're using an older one.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
I'm now running into the permission denied issue when transfering files from the mac to server. How can I fix this?

I MISS SNOW LEOPARD ;(
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Have you successfully installed and configured SSH? Can you SSH in? If so, how are you trying to transfer the files (scp, sftp, smb, etc.)?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
Quote:
Originally Posted by vansmith View Post
Have you successfully installed and configured SSH? Can you SSH in? If so, how are you trying to transfer the files (scp, sftp, smb, etc.)?
I got the SSH installed and connected to the mac via the mac's terminal (logged into the server) and executed the get filename command once in the files folder.

I MISS SNOW LEOPARD ;(
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Can you be a little more specific? What command are you executing and on what machine are you executing it on?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
Quote:
Originally Posted by vansmith View Post
Can you be a little more specific? What command are you executing and on what machine are you executing it on?
Logged into the server I executed the get filename command. Here is an example

get document1.docx

I execute this when I am on the server remotely logged into the Mac & in one of its directories e.g. Documents.

I MISS SNOW LEOPARD ;(
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Are you using FTP? I only ask because get is an FTP command. This is only going to work if you have FTP setup.

If you want simple file transfer, look into scp. Take a look at this.

Here's a simple example. Let's say I want to copy "test_document" from my Mac to my Linux server. I can execute the following to do this:
Code:
scp test_document vansmith@192.168.2.6:/home/vansmith
That will copy test_document over to /home/vansmith on my Linux server over SSH.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
yea, scp isn't as 'user friendly' as ftp. Although you can always pipe a tarball through ssh

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,769
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
True but it doesn't require any setup beyond an SSH account (which is already setup). The syntax is manageable as well if you think of it like cp.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
19birel

 
19birel's Avatar
 
Member Since: Nov 02, 2011
Location: Pennsylvania
Posts: 218
19birel is on a distinguished road
Mac Specs: 2.4Ghz i5 13" MBP antiglare 16gb RAM 500gb HD OSX 10.8.x

19birel is offline
I am using FTP which I setup. I'll try the SCP solution you mentioned as Vansmith.

I MISS SNOW LEOPARD ;(
QUOTE Thanks

Post Reply New Thread Subscribe


« no external disk access after lion-installation | Setting up Mail Server, Rumpus and Hosting a website on same mac mini running OS X Se »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Mail not sending, server offline, since Lion zofiava OS X - Operating System 21 07-18-2014 12:26 PM
Lion and connecting to server 2003 IDG20 OS X - Operating System 2 10-12-2011 09:42 PM
Lion Server logs are full rborge OS X - Operating System 0 10-10-2011 06:03 PM
Help with connecting to 2003 Server!!!! amynmatt Internet, Networking, and Wireless 1 03-26-2006 07:08 AM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 10:52 PM

All times are GMT -4. The time now is 06:48 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?