ssh command

How do I execute a script on remote server called server2.example.com from my PC?

{ 4 comments }

I‘m trying to run the following command:
ssh user@box.example.com sudo command1 /path/to/file

But It give me an error which read as follows:

sudo: sorry, you must have a tty to run sudo

How do I fix this problem?

{ 4 comments }

How can I import a MySQL dumpfile into my database? I’m using CentOS Linux 5 server. My old hosting provider gave me a data.sql file and I do have access to my Unix / Linux server via ssh. So How do I restore my data using command line over the ssh session?

{ 61 comments }