Extract logic for current target ssh user name:
Add Remote#user_name method, with code returning which user name will be used for SSH authentication.
This commit is contained in:
1 parent
868c502531
commit
9985fceb63
2 files changed
+13
-3
No files matched your search
@@ -11,7 +11,11 @@ module Producer
|
||||
end
|
||||
|
||||
def session
|
||||
@session ||= Net::SSH.start(@hostname, Etc.getlogin)
|
||||
@session ||= Net::SSH.start(@hostname, user_name)
|
||||
end
|
||||
|
||||
def user_name
|
||||
Etc.getlogin
|
||||
end
|
||||
|
||||
def fs
|
||||
|
||||
Reference in new issue
Block a user