PDA

View Full Version : [ubuntu] problem with SSH



Shamma009
September 29th, 2010, 09:18 AM
hello there


So, I am using ubuntu to program my robot nao, I want to copy some files to the robot, and I should use a secure connection SSH. However, I looked over the net for ways to do it and I did,
this was the command
scp filename nao@ipaddress:/filedirectory

but it gives me this message
'Permission denied',


any ideas ?


thanks

BkkBonanza
September 29th, 2010, 09:45 AM
The user nao has to have write permissions on the target directory.
If not then you would get that message.

Typically nao would have write permission on it's home directory so you may need to copy it there and then locally use sudo to copy to a privileged directory.

Shamma009
September 29th, 2010, 11:24 AM
I did whatr you said and it is copied now, but how can I do that ? -->


then locally use sudo to copy to a privileged directory.


thanks

BkkBonanza
September 29th, 2010, 02:19 PM
You can login with ssh and then use sudo to gain root rights for copying.

I'm assuming Ubuntu on robot too. But if not then you may be able to just login as root. Some other linuxes don't disable root login.

(If you can login as root then you could also do scp as root without problems - so I'm guessing you can't login as root.)

eg.

ssh nao@ipaddress
(get logged in)

sudo cp myfile /filedirectory
(sudo will ask for pwd again)

Shamma009
October 3rd, 2010, 10:41 AM
it gives me this command


-bash: sudo: command not foun ???

this was my command

nao@nao [127] [~]$ sudo cp libbrowneyes.so /opt/naoqi/lib


thank you again

BkkBonanza
October 3rd, 2010, 10:51 AM
Hmmm. On Ubuntu sudo would be installed by default. I'm guessing the robot doesn't have a regular Ubuntu install then. If not, then your only alternative is to login as "root", but you'll need the password for that. Then you can copy the file without sudo,

cp libbrowneyes.so /opt/naoqi/lib

but you'll need to be in the home directory for nao or use,

cp /home/nao/libbrowneyes.so /opt/naoqi/lib

BkkBonanza
October 3rd, 2010, 10:51 AM
Msg duplicated. Deleted.

Shamma009
October 3rd, 2010, 11:15 AM
It is working now :)

Many thanks, appreciate it :guitar: