diff --git a/lib/bb/fetch2/sftp.py b/lib/bb/fetch2/sftp.py
index 959dc6ec2..82c76bb66 100644
--- a/lib/bb/fetch2/sftp.py
+++ b/lib/bb/fetch2/sftp.py
@@ -85,7 +85,7 @@ class SFTP(FetchMethod):
         urlo = URI(ud.url)
         basecmd = ['sftp', '-oBatchMode=yes']
         if urlo.port:
-            basecmd += ['-P', urlo.port]
+            basecmd += ['-P', str(urlo.port)]
             urlo.port = None
 
         dldir = d.getVar('DL_DIR')
@@ -102,7 +102,7 @@ class SFTP(FetchMethod):
         if path[:3] == '/~/':
             path = path[3:]
 
-        remote = '"%s%s:%s"' % (user, urlo.hostname, path)
+        remote = '%s%s:%s' % (user, urlo.hostname, path)
 
         cmd = basecmd + [remote, lpath]
 
