Significance of key generated by 'ipfs init'

From @Ghoughpteighbteau on Thu Aug 25 2016 23:28:03 GMT+0000 (UTC)

check out ~/.ipfs/config

ipfs init generated the files in ~/.ipfs/, including config, which contains your private key. You’ll notice that in config your peer identity is listed above that private key.

ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme is just a nice example command you can run to prove that things are working, but before you run that, make sure the ipfs daemon is running.

like this:

~ $ ipfs daemon&
~ $ Initializing daemon...
Swarm listening on /ip4/10.10.100.12/tcp/4001
Swarm listening on /ip4/10.10.100.155/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/199.192.105.247/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8079
Daemon is ready
~ $ ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme
Hello and Welcome to IPFS!

...

So, the peer identity is the thing that identifies you on the network, and it gets used as your address in IPNS.

~ $ ipfs swarm peers
/ip4/104.223.59.174/tcp/4001/ipfs/QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6
/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx
/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z
/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM
/ip4/156.56.178.133/tcp/4001/ipfs/QmVjH4F65fnqy1GkBBYiuAkdazKzYsw3LbMVANGFeBGB8e
/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm
/ip4/163.172.135.245/tcp/4001/ipfs/QmTCoBtUYASLvBunWwYem5gTsD5ovNmMZjsRaHto8vP6bh
/ip4/164.132.197.107/tcp/4001/ipfs/QmaxqKpiYNr62uSFBhxJAMmEMkT6dvc3oHkrZNpH2VMTLZ
/ip4/174.24.145.222/tcp/12644/ipfs/QmUWKoHbjsqsSMesRC2Zoscs8edyFz6F77auBB1YBVhgpX
/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
/ip4/202.171.186.123/tcp/21216/ipfs/QmfJmN62s33FGjh2XcLp3LVXEaXJszcGdUctvx7J9CsDzY
/ip4/5.9.90.132/tcp/4001/ipfs/QmQDysR4PLWAADFFns6sBbsknbvMkRqdYBgMRyHDgbWyMG
/ip4/52.43.73.237/tcp/4001/ipfs/QmRexKsvb2YZrceyU6FoYxFDEZKRYcwRburWiRarGURsTQ
/ip4/54.236.205.6/tcp/4001/ipfs/QmfXR7UwpZNgcHEwTgLH9JaJcqQ8Mioe4tJayqWNPKHJze
/ip4/65.19.134.244/tcp/4001/ipfs/QmctA1rfDq4ZiaZgCLcRFvjYdVFfH8ebzTe67bfG7cVWsZ
/ip4/67.84.161.250/tcp/4001/ipfs/QmRfvckFHNSTHFrVwRCd8svQ6mRm7dFXLYBwbUJVQQXHbY
/ip4/68.12.211.164/tcp/4001/ipfs/QmPagZcWDi2ufYc57755zE9baJhqVPgyQKSdZVoxa2YTsW
/ip4/81.236.22.69/tcp/33129/ipfs/QmXKd1pJxTqTWNgGENcX2daiGLgWRPDDsXJe8eecQCr6Vh
/ip4/91.126.205.225/tcp/56456/ipfs/QmdP9LNSHeBYH5TvRgVsCs8XyuFuKbPhpijsCxjA7PGyBH

here’s a list of peers I’m currently connected to.

QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 is the peer identity of the first one in the list. In fact, I can resolve it!

~ $ ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6
/ipfs/QmbtNuavtRJs9BijJo7uMrRSp926F92DKMQHAjQDajMuw1

http://ipfs.io/ipfs/QmbtNuavtRJs9BijJo7uMrRSp926F92DKMQHAjQDajMuw1/

it’s a blog! :laughing: