scp without entering a password each time

scp without entering a password each time

Lets say you want to copy between two hosts host_src and remote_machine. host_src is the host where you would run  scp, ssh or rsyn, irrespective of the direction of the file copy.

  1. On host_src, run this command as the user that runs scp/ssh/rsync
    $ ssh-keygen -t rsa
    This will prompt for a passphrase. Just press the enter key.
    If you assign a password to the key, then you’ll need to enter it each time you scp. It will then generate a private key and a public key. ssh-keygen shows where it saved the public key. This is by default ~/.ssh/id_rsa.pub.
    Your public key has been saved in <your_home_dir>/.ssh/id_rsa.pub
  1. Copy the id_rsa.pub file to remote_machine by either ftp, scp, rsync or any other method.
  1. On remote_machine, login as the remote user which you plan to use when you run scp, sshor rsync.
  2. Append the contents of id_rsa.pub to ~/.ssh/authorized_keys
    $ cat id_rsa.pub >>~/.ssh/authorized_keys
    $ chmod 700 ~/.ssh/authorized_keys

If this file does not exists, then the above cat command will create it. Make sure you remove permission for others to read this file via chmod. If its a public key, why prevent others from reading this file? Probably, the owner of the key has distributed it to a few trusted users and has not placed any additional security measures to check if its really a trusted user.

Optional – allowing root to ssh:

  1. ssh by default does not allow root to log in. This has to be explicitly enabled on remote_machine. This can be done by editing /etc/ssh/sshd_config and changing the option of PermitRootLogin from no to yes.
  2. Don’t forget to restart sshd so that it reads the modified config file.
  3. Do this only if you want to use the root login.

That’s it. Now you can run scp, ssh and rsync on host_src connecting to remote_machine and it won’t prompt for the password. Note that this will still prompt for the password if you are running the commands on remote_machine connecting to host_src. You can reverse the steps above (generate the public key on remote_machine and copy it to host_src) and you have a two way setup ready!

Teddy Roosevelt on armchair critics

Teddy Roosevelt on armchair critics

“It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat.” – Teddy Roosevelt, from a speech delivered April 23rd, 1910 in Paris.

Self-deception as our greatest cultural danger

Self-deception as our greatest cultural danger

It has become apparent to me that there is a flaw in a great amount of Christianity that is sold to us today in the US and in the way people ‘believe’.  Namely, that simply ‘believing’ in God/the infinite love of God is enough. Many people ‘believe’ in God the same way I ‘believe’ in Morgan Freeman. I can know with 100% certainty that he exists and even seen all his works and read all his books. But as Christians, we are called to much, much more than that. This ‘belief’ alone is not enough. If I show up at his door, would Morgan Freeman, or Christ, know who I am?

As Jesus himself warns us many, many times:

“Many will say to Me on that day, ‘Lord, Lord, did we not prophesy in Your name, and in Your name drive out demons and perform many miracles?’ Then I will tell them plainly, ‘I never knew you; depart from Me, you workers of lawlessness.’ Therefore everyone who hears these words of Mine and acts on them is like a wise man who built his house on the rock.” -Matthew 7

Again, we hear about the wise and foolish virgins:

“Then the kingdom of heaven shall be likened to ten virgins who took their lamps and went out to meet the bridegroom. Now five of them were wise, and five were foolish. Those who were foolish took their lamps and took no oil with them, but the wise took oil in their vessels with their lamps. But while the bridegroom was delayed, they all slumbered and slept.

“And at midnight a cry was heard: ‘Behold, the bridegroom is coming; go out to meet him!’ Then all those virgins arose and trimmed their lamps. And the foolish said to the wise, ‘Give us some of your oil, for our lamps are going out.’ But the wise answered, saying, ‘No, lest there should not be enough for us and you; but go rather to those who sell, and buy for yourselves.’ 10 And while they went to buy, the bridegroom came, and those who were ready went in with him to the wedding; and the door was shut. 11 “Afterward the other virgins came also, saying, ‘Lord, Lord, open to us!’ 12 But he answered and said, ‘Assuredly, I say to you, I do not know you.’” – Matthew 25

It is not enough to walk around believing we are followers or preaching just the infinite love of God while ignoring his commandment to complete conversion, abandonment of self, and to accompany him on the way each day. Instead, many of us follow our own ways: feeling smug and secure with that idea of infinite love in our ‘back pocket’ as it were and going through the motions of Church/etc each week. Instead, we must fully embrace that infinite love. We fall in love and embrace a relationship with our living God by daily prayer in which we spend time with our beloved. We share our deepest self and deepest desires. We then let ourselves be shown our true selves, have our desires purified as needed, and embrace the commandment to die utterly to ourselves, pick up our cross, embrace God’s will in our life as Christ did, and be utterly converted. To preach one without the other leaves people unprepared as the foolish bridegrooms or the workers of great deeds with no love of God.

Instead, if we seek always complete abandonment and conversion as God has asked, we find ourselves at that moment on our knees as Jesus says:

So you also, when you have done everything you were told to do, should say,
‘We are unworthy servants; we have only done our duty.’ – Luke 17

Do not sleepwalk through your life and relationship with God. Be awakened today – for conversion is a lifelong process. Asking at the end will be too late – as Christ himself tells us. One we can only ask for the grace to see through to the end. THIS is the day in which to be embraced by his infinite love. Turn now and pray with all your sins and failings for forgiveness AND conversion of heart. The infinitely loving God is ready to embrace the prodigal son with all the infinite love and open arms that we hear about, but then entrench yourself anew in the work of your conversion without delay. For the key to salvation is to remain in that love.

The end of the Christmas season – Epiphany

The end of the Christmas season – Epiphany

Epiphany – N. a usually sudden manifestation or perception of the essential nature or meaning of something (2) : an intuitive grasp of reality through something (as an event) usually simple and striking (3) : an illuminating discovery, realization, or disclosure

The arrival of the wise astrologers from the east in many countries is more traditionally the time to exchange gifts (instead of Christmas day). Many places around the world dress 3 children as the astrologers and they proceed through a town blessing houses as they go. (I’ll be blessing my door later today).

But these non-believer wise astrologers/astronomers are also something else. They are a reminder that at the heart of every person is a profound and unquenchable desire to find Truth. Not platitudes or passing cultural fads – but real truth that lasts eternally and fills the heart with endless and complete joy. It aligns our actions for peaceful existence with each other. The truth about ourselves, all of creation, and how much we are loved. How someone is ready to pick them up and lovingly bring them back today – no matter what life has dragged them through. Truth about how we should live and treat each other. Truth that heals relationships and causes enemies to become friends. Truth that also is a profound call to constant and complete conversion of heart and action.

As a child, I loved watching shows on science. Quantum mechanics, the planets, and the universe. I became an engineer because I loved every new thing I learned about our world and how it worked. Each new thing brought joy to me. In the same way, I believe these non-believers followed the study of the stars towards truth. But there is always more. All the study of everything in the world, while great and wonderful, is simply never enough to fill our hearts.

Epiphany reminds us that no matter what course we take – we will end up at the same destination: the mystery and ‘scandal’ of divinity in a child born in a barn. Born to humble, Jewish, blue-collar parents in a country defeated and under the rule of another nation. The reality of a God that casts off all his privilege and wealth – sheds every royal garment to become a helpless child in the midst of this mess. One that call us to complete conversion of desire and heart. To reframe ourselves to value, as he does, every human being and all of creation.

May this be a blessed Epiphany for each of you.

$200 dishes served on…iPads.

$200 dishes served on…iPads.

Quince restaurant in San Francisco – you’ll find one of the most ridiculous and pretentious concepts in fine dining ever conceived- frog legs and white truffle croquettes served on an iPad.

A Dog In Search Of Gold

A video posted by rosé (@asap.rozzy) on

The croquettes plate is called A Dog In Search Of Gold, and it’s served on an iPad showing a video of dogs hunting for truffles, part of a $220 fixed-price supper that otherwise sounds quite delicious

Connecting iSpy to an Amcrest IP2M-841 webcam

Connecting iSpy to an Amcrest IP2M-841 webcam

This was more annoying than it should have been. When setting up my Amcrest IP2M-841B camera, I was able to use the Amcrest IP Config tool to log in and watch my camera without issue.

When using iSpy 64, however, the darn thing couldn’t figure out how to connect to it. Here’s how I did it. I left the camera on channel 1, set the encoding to plain H.264, and then did the following.

Test your camera using Amcrest IP config.

The first thing is to make sure your camera is working at all:

  1. Be sure you can open the IP config tool and see your cameras.
  2. Make sure passwords are correct, you can get a live view, and that it’s set to H.264 encoding and the channels are correct.

 

Test your rtsp line using VLC:

  1. Open VLC (install it if you need)
  2. Media->Open Network Stream
  3. Copy in your rtsp: address
    1. example without the username/password:
      1. rtsp://192.168.1.99:554/cam/realmonitor?channel=1&subtype=0
      2. VLC will ask for your username/password and you can enter it.
    2. example with the username/password:
      1. rtsp://<username>:<password>@<ipaddress>:554/cam/realmonitor?channel=1&subtype=0
      2. I left the arguments as –rtsp-caching=100 (the default)
  4. You should see your stream come up in VLC
  5. NOTE: When setting your password, if you have any special characters like %!&#$ – or the like – be sure to convert them to their equivalent hex ASCII codes. See this chart here.
    1. Example: if your password is ‘cat&dog’, you should use the password: ‘cat%26dog’

Connecting to iSpy

If connecting via VLC worked, your 75% of the way there.

  1. Start iSpy
  2. Add->IP Camera
  3. Select the VLC Plugin tab (I have VLC installed, not sure if that’s 100% necessary)
  4. Set the VLC URL to what you had above (with the username+password):
    rtsp://<username>:<password>@<ipaddress>:554/cam/realmonitor?channel=1&subtype=0
  5. When setting the password, if you have any special characters like %!&%#$ – or the like – be sure to convert them to their equivalent hex ascii codes. See this chart here.
    1. Example: if your password is ‘cat&dog’, you should use the password: ‘cat%26dog’
  6. I left the arguments as –rtsp-caching=100 (the default)

Once you have iSpy connected, you can set up events and connect to the cloud for full web monitoring.

 

Resources:

So, where did I get that rtsp line? Directly from the Amcrest HTTP API SDK Protocol Specification. Section 4.1.1, p14 – Get real-time stream. It’s also a handy guide on all the other parameters you can send the camera.

Lane Finding

Lane Finding

My first homework assignment for my self-driving automotive class was to find lanes on still, then on captured video. Here was my first attempt, which seems to have come out pretty well. I still want to improve it a bit with some more frame-to-frame smoothing.

Useful links/techniques:

Social Media sites are Highly Manipulable – by just as few as 3-5 accounts

Social Media sites are Highly Manipulable – by just as few as 3-5 accounts

Research is demonstrating that changing the entire narrative on a topic is shockingly easy on social media sites. Sites that claim to be free of such manipulation via user-submitted content and using up/down vote systems such as Reddit are shockingly susceptible.

In most cases, researchers found it only took 1 bot casting 3-5 up/down votes at the right time to change the tone of an entire subreddit for/against something. Further experiments showed that it only took about $200 to get a completely false story to the front page of Reddit. There is growing evidence that this is already been happening in the Bitcoin Reddit forum.

This is likely not only going to be used by advertisers but foreign agencies to change the narratives of just about any topic. All of this comes on a budget that is just pennies compared to traditional advertising and military efforts.

Perhaps this will cause us to come full-circle back to curated media – or for a startup to start a vetting and verification service?

Either way, the old adage is as true than ever: Don’t believe it just because you read it on the internet. But now we might add: Also don’t believe it just because it gets lots of up/down votes.