tags:

views:

1049

answers:

3

The following code does not work

scp /home/username/public_html/site/pictures/* myUsernameAtMyMac@myIpAddress:/home/Masi/Desktop/

I have "Allow only essential services" in my Mac's firewall.

How can you solve the problem?

[edit]

I get the following error after I have "Remote Login" in the list of allowed services. I also allowed "All users".

scp favicon.ico [email protected]:/home/Masi/Dropbox/
ssh: connect to host 11.111.11.111 port 22: Connection timed out
lost connection

[edit] I tried to login to my computer from another Macbook unsuccessfully by the following command

ssh [email protected]

I get an operation timeout error.

I managed once to connect from my server to my computer with the above command, but the connection was quickly timeout.

+1  A: 

The scp command itself is OK.

As for your problem, impossible to say with the information given. Can you ping the machine? Try to ssh with the "-v" switch to see if you get some more relevant info about the connection procedure.

janneb
I get the error when I try to ping my computer at my server: ping: icmp open socket: Operation not permitted
Masi
+4  A: 

You need to add the SSH service to the allowed applications in the firewall configuration of your Mac and change your firewall settings to “Set access for specific services and applications.”.

Having your firewall set to “Allow only essential services.” blocks incoming connections to services running on your machine.

See also on the Apple support site: http://docs.info.apple.com/article.html?path=Mac/10.5/en/11783.html

x-way
If users are using FileVault they will not be able to use SSH keys for authentication as discuss in page 121 of this document (http://manuals.info.apple.com/en_US/Tiger_Security_Config_021507.pdf)
Pierre-Luc Simard
How can I allow the SSH service?
Masi
When you activate the SSH service in the 'Sharing' preferences, it is automatically added to the list of allowed applications, but you still need to set the firewall to “Set access for specific services and applications”.
x-way
@Pierre: I am not using FileVault. @x-way: I have not yet any programs in the firewall list. Which one of “Allow only essential services” and “Set access for specific services and applications” is more safe to use?
Masi
@x-way: I set "Remote Login" to be allowed. I get an error when I try to connect, please, see the question.
Masi
According to the Apple support site you need "Set access for specific services and applications." when you want to allow incoming connections. You can't say that one is more safe than the other, it depends on what you want to do with your Mac.
x-way
A: 

Try this command using your mac. Should work without any firewall modifications or router settings.

scp yourUsernameAtYourServer@YourServer:/home/username/public_html/site/pictures/* /home/Masi/Desktop/

If you are using NAT to get more then one box connected to the internet this does not work. The IP of your Mac is not visible outside your home network. In this case you have to add a port forwarding rule to yout router.

myUsernameAtMyMac@myIpAddress
Timo
scp does not do globbing on the remote side, try copying the whole folder instead:scp -r youUsernameAtYourServer@YourServer:/home/username/public_html/site/pictures /home/Masi/Desktop/
x-way