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:
@@ -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