Knowledgebase

can we move files via ssh which has no domain on board ?

Posted by ransome, 09-12-2011, 04:46 PM
I am wondering if its possible to move a file on a server which has no domain but just an ip address. actually I installed kloxo on my vps - it has no domain & just 1 ip address, so I just created a dummy domain and added a tar file into that, I tried accessing it via (I added that certain dummy domain to be default) : http://ipaddress/file I get file not found, for me this is not an issue but is it possible for me to move this file via ssh to another vps server of mine, if yes how can I do that ? I know I can move files from a working domain and I am doing that, but I have never ever moved files in the structure mentioned above. I am a beginner at this, so kindly do help with commands.

Posted by twikamltd, 09-12-2011, 05:39 PM
Look at your httpd.conf, see where the default site is on the server, and put the files in there.

Posted by bear, 09-12-2011, 05:46 PM
One way would be to use scp. "-P 22" just defines the SSH port...may not need to use it if you haven't changed the default.

Posted by techjr, 09-12-2011, 05:49 PM
I don't quite remember the command but this should work. First use cd to get into the same directory as the file is in then run the command. Obviously change filenamehere to the name of the file you are transferring. User is the remote servers root username and servernameorip is the ip of the server or the name of it. scp filenamehere user@servernameorip:/wanteddirectory Or if you wanted to transfer a whole folder and everything in its sub directory: -r pretty much tells the server to transfer all files in your current directory and sub directory's. There is more to it but keep it simple. I am not 100% positive this will work but it should. Hopefully someone else can come along and correct it if needed. Last edited by techjr; 09-12-2011 at 05:52 PM.

Posted by techjr, 09-12-2011, 05:51 PM
Took me 10 minutes to type mine out and you beat me to it....

Posted by ransome, 09-13-2011, 07:55 AM
thanks for the help friends so if in case my file name is - folder.tar should that be in the following way: 1.1.1.1 - an example ip from which I will be transferring files 2.2.2.2 - destination ip scp -P 22 folder.tar root@2.2.2.2:/home/admin/xv/ xv is the folder where I am moving the file is this correct ? if not kindly correct my command

Posted by rnts, 09-13-2011, 08:08 AM
If the ssh-server is running on port 22 already you dont have to use -P. The above command is correct if you are logged into the 1.1.1.1 host.

Posted by ransome, 09-13-2011, 08:49 AM
thanks for the confirmation rtns

Posted by ransome, 09-13-2011, 09:15 AM
thanks friends, I was able to move files successfully using the above command

Posted by techjr, 09-13-2011, 08:30 PM
Nice to know it worked out. There are other options to transfer files over but scp has been the lease troublesome even if it's not always the fastest.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Here is what I did (Views: 576)
Finding out more... (Views: 527)
web ftp secure files (Views: 606)


Language:

Client Login

Email

Password

Remember Me

Search