LoginSignup
3
3

More than 3 years have passed since last update.

ShinobiLayer: sftpを使ったSoftLayer Object Storageへの簡易アクセス方法

Last updated at Posted at 2015-03-20

はじめに

過去に以下の方法を紹介してきましたが、これは5GBの壁を越えてファイルの転送をしたいからです。

5GB以下のファイルを取り扱うだけで良いのであれば、sftpを利用するのが一番簡単かもしれません。ただし、5GBを越えるファイルを転送すると、5GBを超過するタイミングで転送が止まってしまうので注意してください。

Object Storageへの接続情報の確認

SoftLayerのCustomer PortalからUsernameとPasswordを確認しておきます。
objectstorage01_mosaik.jpg
objectstorage02_mosaik.jpg

Linuxのsftpコマンドによるアクセス

下記では、ログイン後、コンテナ内を移動したりファイルをアップロードする例を示します。

  • xxxxxxxxの箇所は、Username
  • passwordの箇所は、API Key
[root@tok01 ~]# sftp xxxxxxxx@tok02.objectstorage.softlayer.net
Connecting to tok02.objectstorage.softlayer.net...
xxxxxxxx@tok02.objectstorage.softlayer.net's password:
sftp> ls
cachetest      shinobilayer
sftp> cd shinobilayer
sftp> ls -l
-rw-------    1 65535    65535         244 Feb 20 16:44 index.html
-rw-------    1 65535    65535         218 Feb 20 16:45 menu.html
-rw-------    1 65535    65535       24237 Feb 20 16:45 ninja.jpg
-rw-------    1 65535    65535           0 Mar 20 00:01 test.data
-rw-------    1 65535    65535          93 Feb 20 16:45 top.html
sftp> pwd
Remote working directory: /shinobilayer
sftp> lpwd
Local working directory: /root/test
sftp> lls -l
total 1028
-rw-r--r-- 1 root root 1048576 Mar 20 09:25 test.data
sftp> put test.data
sftp> ls -l
-rw-------    1 65535    65535         244 Feb 20 16:44 index.html
-rw-------    1 65535    65535         218 Feb 20 16:45 menu.html
-rw-------    1 65535    65535       24237 Feb 20 16:45 ninja.jpg
-rw-------    1 65535    65535     1048576 Mar 20 00:28 test.data
-rw-------    1 65535    65535          93 Feb 20 16:45 top.html

(参考)http://knowledgelayer.softlayer.com/procedure/connect-object-storage-using-sftp

WinSCPによるアクセス

  • xxxxxxxxの箇所は、Username
  • passwordの箇所は、API Key

を入力します。

WinSCP.jpg
WinSCP2.jpg

(参考)http://knowledgelayer.softlayer.com/procedure/accessing-object-storage-using-winscp

終わりに

Cyberduckやpython-swiftclientは敷居が高いという方は、是非sftpでのアクセスを試してみてください。ちょっとしたことにはsftpで十分だと思います。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3