This article is about how to move files between servers using the scp (secure copy) command. To show how it works, I will move files from my HDD to a virtual machine running on VirtualBox. There is Linux Mint 11 installed on both drives.
This tutorial comes without warranty of any kind. I do not guarantee that this will work for you.

1 Preliminary Note

Using scp you can not only move files to and between virtual machines like I will do, but move them to any server on the world as well. You only have to know that server’s IP adress and the passwords needed to access it.

2 Configuring the Virtual Machine’s System

To be able to send files to your virtual machines, you first need to have some specific configuration. Open VirtualBox, select the virtual machine you have your target system running on and open Settings > Network. Select the correct Adapter tab (the first one if you haven’t done any changes yet) and select Bridged Adapter from the Attached to: dropdown menu. Run your virtual machine afterwards. Once started, open a terminal and enter

sudo apt-get install openssh-server

ifconfig will show you some blocks, one titled eth0.
ctest@ctest-System-Product-Name ~ $ ifconfig
eth0   Link encap:Ethernet  HWaddr f4:6d:04:94:8f:17
inet addr:  Bcast:  Mask:
inet6 addr: fe80::f66d:4ff:fe94:8f17/64 Scope:Link
RX packets:234392 errors:0 dropped:0 overruns:0 frame:0
TX packets:128835 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:332109021 (332.1 MB)  TX bytes:11758082 (11.7 MB)
Interrupt:43 Base address:0x6000

lo Link encap:Local Loopback
inet addr:  Mask:
inet6 addr: ::1/128 Scope:Host
RX packets:39 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2424 (2.4 KB)  TX bytes:2424 (2.4 KB)

ctest@ctest-System-Product-Name ~ $

The IP shown on inet adress: is the one your machine has in your internal network, it will be the one you are going to access the machine under. Go back to the sender system now that you know the receiver’s IP. If you have the files to send and the directory to store them on your virtual machine ready, you can proceed by sending the files. Replace the items in [square brackets] with the actual data:

scp [path of file to send] root@[receiver's IP]:[target directory]

Here is what it looked like if I wanted to send the file FunnyVideo.mp4 in the /home/ctest/Videos directory to the /home/virtualguy/Videos directory of the system with the internal IP

scp /home/ctest/Videos/FunnyVideo.mp4 root@

It may happen that you receive following message having entered the scp command:
ctest@ctest-System-Product-Name ~ $ scp /home/ctest/Videos/FunnyVideo.mp4
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/ctest/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/ctest/.ssh/known_hosts:4
remove with: ssh-keygen -f “/home/ctest/.ssh/known_hosts” -R
ECDSA host key for has changed and you have requested strict checking.
Host key verification failed.
lost connection
ctest@ctest-System-Product-Name ~ $

This, in most cases, is caused by the fact that the system with the given IP is no longer the same system as it was when you last connected to the same IP, for example, if you hosted a new virtual machine that then took the same IP as the old one. To correct this issue, follow the commands given in the message to remove the offending key. In my case, it is:

ssh-keygen -f "/home/ctest/.ssh/known_hosts" -R

Make sure to replace the path and the IP with the ones matching your inputs. You can also remove the key manually by opening the known_hosts file with a texteditor and removing the key (as root, of course).
If no issue of that sort appears or you have dealt with it, you will be asked if you really want to proceed. Type in yes and hit Enter to confirm. You will then be asked for the receiver’s root password. Type it in and hit Enter again. The copied file should then be accessible on the receiver’s targeted directory, although you should not have any permissions to write or execute it. If you want to grant you full permissions, use

sudo chmod 777 /home/virtualguy/Videos/FunnyVideo.mp4

and make sure to change the path value to the one of your file.

33 Replies to “DevOps Training Lecture #3 GITLAB Configuration”

  1. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter
    updates. I’ve been looking for a plug-in like this for quite
    some time and was hoping maybe you would have some experience with something
    like this. Please let me know if you run into anything.

    I truly enjoy reading your blog and I look forward to your new updates.

  2. Excellent goods from you, man. I’ve understand your stuff previous
    to and you are just too excellent. I actually like what you’ve acquired here, really like
    what you’re stating and the way in which you say it.

    You make it enjoyable and you still care for to keep
    it smart. I cant wait to read far more from you. This is really a tremendous site.

  3. I have been exploring for a little for any high quality articles or blog posts on this
    sort of area . Exploring in Yahoo I eventually stumbled upon this website.
    Reading this information So i am glad to express that I have an incredibly good uncanny feeling
    I found out just what I needed. I most without a doubt will make certain to do not fail to remember this
    website and provides it a glance on a relentless basis.

  4. I’ve been browsing online more than three hours today,
    yet I never found any interesting article like yours.

    It is pretty worth enouugh for me. In mmy opinion, if all ssite owners and bloggers mace good content as yoou did, the neet
    willl bee much more useful than ever before.|
    I could not resist commenting. Well written!|
    I will immediately clutch your rsss feed as I can not in finding your e-mail subscription link or newsletter service.
    Do you have any? Kindlyy permit me recognize iin order that I could subscribe.

    It is the best time tto make some plans for thee future and it’s time to
    be happy. I’ve read this post and if I could I desire to suggest you some interesting things or tips.
    Perhaps you couhld write next articles referring to this article.

    I wissh to read more things about it!|
    It’s perfect time to make some plans for the longer term and it
    is time to bbe happy. I’ve read this publish and if I could I want to
    counsel you some interesting issues or tips. Perhaps youu could write next articles relating to this article.
    I wisxh to read more issues about it!|
    I’ve been browsing online greater than 3 hours today, but I by no means
    fkund any fascinating article like yours. It’s pretty worth enough
    for me. Personally, if all webmasters and bloggers made excellent content
    as you did, the internet will be a lot more helpful than ever before.|
    Ahaa, its nice conversation on the topic of this article here at this weblog, I have read alll
    that, so at this time me also commenting here.|
    I am sure this article has touched all the internet people, its really really good piece of writing
    on building up new webpage.|
    Wow, this paragraph is pleasant, my younger sister is anlyzing these things, thus I am going
    too convey her.|
    bookmarked!!, I like your blog!|
    Way cool! Some very valid points! I appreciate you
    writing this article plus the rest of the site is extremely good.|
    Hi, I doo think this is an excellent website. I stumbledupon it ;
    ) I am going to return yet again ince I book marked it.
    Money annd freeom is the greatest way to change, may you be rich and continue to help other people.|
    Woah! I’m really loving the template/theme of this site. It’s simple, yet effective.

    A lot oof times it’s challenging tto get that “perfect balance” betwen user
    friendliness and appearance. I must say that you’ve doone a fantastic job with this.
    Also, the blog loads extremely fast for me onn Opera. Outstanding Blog!|
    These are actually great ideas in regarding blogging. You have touched some nice factors here.
    Any way keep up wrinting.|
    I really like what you guys tend to be up too.
    Such clever work and coverage! Keep up the very good works guys I’ve
    added you guys to my own blogroll.|
    Hello! Someone in my Myspace group shared this site with us so I
    came to chec it out. I’m definitely loving the information. I’m bookmarking aand will be tweeting this to my followers!
    Outstanding blog and superb design.|
    Ilike what you guys aree upp too. This sort of clever work and exposure!
    Keep up the trrific works guys I’ve included you guyss
    to our blogroll.|
    Hi there would you mibd stgating which blog platform you’re using?
    I’m gping to start my own blog iin the near future but I’m having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most blogs and I’m loooking
    for something unique. P.S Sorry for getting off-topic buut I
    had to ask!|
    Hello would you mind letting me know which wbhost you’re utilizing?
    I’ve loaded your blog in 3 different interrnet browsers
    and I must say this blokg loads a lot faster then most.
    Can you recommend a good internet hosting provider at a reasonable price?
    Cheers, I appreciate it!|
    I love it when people coime together and share opinions.
    Grwat blog, stick with it!|
    Thank you for the auspicious writeup. It in faqct was a
    amusement account it. Look advanced to more addedd agreedable from you!
    However, how could we communicate?|
    Hi there just wanted to give yoou a quick heads up.
    The text in your content seem to be running off thee screen in Safari.
    I’m not sure if this is a format issue or something to do
    with web browser compatibility but Ithouught I’d post to let you know.
    The layout look great though! Hope you get the problem resolved soon. Kudos|
    Thiis is a tolic that’s near tto my heart…Take care!
    Where are yopur contact details though?|
    It’s very simple to find out any topic on net as compared to books, ass I found this article at this
    Does your blog have a contact page? I’m having trouble locating it but, I’d like too
    send you an email. I’ve got some creative ideas for your blog you might be interested in hearing.
    Either way, great site and I look forwrd tto seeing it develop over time.|
    Hey there! I’ve been reading your weblog for a long
    time now and finally got the courage to go ahead and give you
    a shot outt fro Dallas Texas! Just wanted to
    say keep uup the goo work!|
    Greetings from Ohio! I’m bored to tears at work so I decided to browse your website on my iphone during lunch break.

    I really like the knowledge you prewent here and can’t wait to
    take a look when I get home. I’m shocked at how quick your blog loaded oon my cell phone ..
    I’m not even using WIFI, jusst 3G .. Anyhow, superb blog!|
    Its such as you read my thoughts! You appear tto understand a lot approximately this, like you wrote the e-book in it or something.
    I feel that you jjst could do with a few p.c.

    to power the message home a bit, but other tha that, that is excellent
    blog. A fantastic read. I’ll certainly be back.|
    I visited many web sites but the audio quality
    for audio songs current at this siute is actuially
    Hello, i read your blog occasionally and i own a similar one and i was jst wondering if you get a lot
    of spam remarks? If so how do you stop it, any plugin or
    anything you can recommend? I get so much lately it’s driving me
    insane so any assistance is very much appreciated.|
    Greetings! Very helpful advice wthin this post! It’s the little changes that produce the most imortant changes.
    Thanks ffor sharing!|
    I absolutely love your site.. Great colors & theme. Diid you build this web site yourself?
    Please replly back as I’m looking to create my owwn personal
    blog and would like to know where you got this ffom or exactly what the theme is named.
    Appreciate it!|
    Helllo there! This artihle could not be written any better!

    Reading through this artticle reminds me of my previous roommate!

    He continually kept preaching abolut this. I’ll send this information to
    him. Pretty sure he’ll havve a very good read. Thanks for sharing!|
    Incredible! This blog looks exactly like my old one! It’s on a entirely different subject but it has pretty much
    the same page layout and design. Outstanding choice of colors!|
    There is certainly a great deal to find out about this subject.
    I loge all the points you made.|
    You made some decent pooints there. I looked on the web for more info about the issue and found most ppeople will
    go along with your views on this website.|
    Hi there, I read your log regularly. Your humoristic style is awesome,
    keep up tthe god work!|
    I just could not go awway your site before sugfesting that I reallpy enjoyed thhe
    usual info an individual supply tto your visitors? Is going
    to be again steadily to check up on new posts|
    I wanted to thank you for this wonderful read!! I absolutely enjoyed every bitt of it.
    I have got you bookmarked to look at new things you post…|
    What’s up, just wanted to say, I enjoyed this blog post.

    It was funny. Keep on posting!|
    Hello, I enjoy reading all of your post. I like to write a little
    comment to support you.|
    I always spent my half an hour to read this web site’s articles aall the
    time along with a mug of coffee.|
    I for alll time emailed this webpage post page to all
    my friends, for the reason that if like to read it aftsr
    that my contacts wilkl too.|
    My programmer is trying to convince me to move to .net
    from PHP. I have always disliked the idea because
    of the expenses. But he’s tryiong none the less. I’ve beesn using
    WordPress oon several websites for about a year and am concerned about switchinng to another platform.
    I have heard great things about Is there
    a way I can transfer alll my wordpress posts intfo it? Any kind of
    help would be greatly appreciated!|
    Hi! I could have sworn I’ve visited your blog before
    buut after going through some of the posts I ralized it’s new to me.
    Nonetheless, I’m certainly delighted I found it and I’ll be bookmarking it
    and cheecking back frequently!|
    Terrific article! That is the type of information that arre supposed to be shared across the net.

    Disgrace onn the search engines ffor now nnot poitioning this put
    up upper! Come on over and talk over with my website .
    Thhank you =)|
    Heya i am for the first time here. I came across this board annd I find It
    really useful & it helped me out much. I hope to
    give something back and help others like you aided me.|
    Hello, I think your site could possibly be having browser
    compatibility problems. When I look at your blolg in Safari,
    it looks fine but when opening inn I.E., it haas some overlapping issues.
    I just wanted to give you a quick heads up! Apart from that, wonderful site!|
    Somebody essentially lend a hand to make severely posts I’d state.
    Thhat is the first time I frequented your web page and to this point?
    I amazed with the research you made to create this actual post incredible.
    Great task!|
    Heya i’m for the primary time here. I found this board and I in finding It
    truly heloful & it helped me out a lot. I’m hoping to present something back and help othgers
    like you aided me.|
    Hi! I simply want tto offer you a huge thumbs up for your
    excellent information you have hewre on this post. I will be returning to your blog for more
    I every time usd to study article in news papers but
    now as I am a user of internet therefore rom now I am using net for
    articles, thanks to web.|
    Your method of describing all in this paragraph is reall good, every one be capable of without difficulty understand
    it, Thanks a lot.|
    Hi there, I foound your blog by way off Google whilst searching for a
    comparable matter, your site got here up, it
    seems to bbe good. I’ve bookmarked it in my google bookmarks.

    Hello there, simply became aware of your weblog via Google, andd located thaat it is really informative.
    I am gonna watch out for brussels. I will be grateful
    if you happesn to proceed this in future. Many other people cann be benefited out of your writing.
    I’mcurious to find out what blog platform you happen to
    be working with? I’m experiencing some small security issues with my latest
    site and I would like to find something more risk-free.

    Do you have any solutions?|
    I am resally impressed with your writing skills as well ass
    with the layout on your blog. Is this a ppaid theme or
    did you customize itt yourself? Anyway keep up the nice quality writing,
    it’s rare to seee a nice blog like ths one these days.|
    I am extremely impressed with your writjng abilities as neatly as with the format for your weblog.
    Is that this a paid subject matter or did you modify it your self?
    Eitther way stay up the excellent high quality writing, it is
    uncommon to look a great blog like tthis one these days..|
    Hi, Neat post. There’s an issue with your web site iin web explorer,
    wold check this? IE nonetheless iis the marketplace leader and a big componemt to foloks will miss your excellent writing because of this problem.|
    I’m not sure where you are ggetting your info, but
    great topic. I needs to spend some time learning much more or understanding
    more. Thanks for magnificent information I was looking for this info for my mission.|
    Hello, i think that i saw you visited my website
    thus i came tto “return the favor”.I aam attempting tto find things
    to improve my web site!I suppose its ok to usse a
    few of your\

  5. Thank you, I have just been searching for info about this topic for ages and
    yours is the greatest I have found out till now. But, what about the conclusion? Are
    you positive about the supply?

  6. You really make it seem so easy together with your presentation but I in finding this
    matter to be actually one thing which I think I’d never understand.
    It sort of feels too complex and very huge for me. I am having
    a look forward on your subsequent put up, I’ll attempt to get the hang of it!

  7. Have you ever considered creating an ebook or guest authoring on other blogs?

    I have a blog based on the same information you discuss and would love
    to have you share some stories/information. I know my visitors
    would enjoy your work. If you’re even remotely interested, feel free to shoot me an e-mail.

  8. Have you ever considered about including a little bit more than just your articles?
    I mean, what you say is important and everything. But think about if
    you added some great photos or videos to give your posts more, “pop”!

    Your content is excellent but with pics and clips, this website could
    definitely be one of the best in its field. Very good blog!

  9. I’ve been exploring for a little for any high-quality articles or blog
    posts in this sort of space . Exploring in Yahoo I finally stumbled upon this web site.
    Studying this info So i’m satisfied to exhibit that I have a very good uncanny feeling I discovered exactly what I needed.
    I so much unquestionably will make sure to do not disregard this
    site and give it a glance regularly.

  10. IT услуги, обслуживание офиса, компьютерных сетей ✓
    Комплексный подход, выгодные цены, гарантия качества ☎ (044) 536-25-40, (098) 996-25-40

  11. If ssome one desires to be updated with hottest technologies afterward hee must be pay a visit this web
    pagge and be up to date everyday.

  12. I know this if off topic but I’m looking into starting
    my own weblog and was wondering what all is needed to get setup?

    I’m assuming having a blog like yours would cost a pretty penny?

    I’m not very web savvy so I’m not 100% positive. Any tips or advice would be greatly
    appreciated. Appreciate it

  13. IT услуги, обслуживание офиса, компьютерных сетей ✓ Комплексный подход, выгодные цены,
    гарантия качества ☎ (044) 536-25-40, (098) 996-25-40

  14. Good day! Do you use Twitter? I’d like to follow you if that would be ok.

    I’m absolutely enjoying your blog and look forward to new posts.

  15. Anxiety disorder is easily the most commin mental heralth issue faced by almost 18% of Americans at soome point off these life.
    Finally, you have to find out how an organic proven technique can Drive You Toward
    The Road To Recovery. Thiss is one of the biggest mistakes because anxiety and
    panic attacks is oftern curfable and it really is actually not as hard because so many people believe.

Comments are closed.